plenty of changes to make the package more ergonomic
Including: bug fixes, api changes, new packages, and more!
This commit is contained in:
@ -25,7 +25,7 @@ type Config struct {
|
||||
Version string
|
||||
// Name of an organization providing the service
|
||||
ServiceProvider string
|
||||
Exporters []exporters.ExporterWithConfig
|
||||
Exporters []exporters.TraceExporter
|
||||
}
|
||||
|
||||
func newResource(config Config) *resource.Resource {
|
||||
@ -38,6 +38,16 @@ func newResource(config Config) *resource.Resource {
|
||||
return r
|
||||
}
|
||||
|
||||
// NOTE: You can use [trace.WithAttributes] as a parameter to opts argument
|
||||
func Start(ctx context.Context, spanName string, opts ...trace.SpanStartOption) (context.Context, trace.Span) {
|
||||
return fiberOpentelemetry.Tracer.Start(ctx, spanName, opts...)
|
||||
}
|
||||
|
||||
// NOTE: You can use [trace.WithAttributes] as a parameter to opts argument
|
||||
func FStart(c *fiber.Ctx, opts ...trace.SpanStartOption) (context.Context, trace.Span) {
|
||||
return fiberOpentelemetry.Tracer.Start(c.UserContext(), c.Method()+" "+c.Path(), opts...)
|
||||
}
|
||||
|
||||
func NewMiddleware(config Config) func(*fiber.Ctx) error {
|
||||
var tracerProviders []trc.TracerProviderOption
|
||||
|
||||
|
Reference in New Issue
Block a user