MCPcopy
hub / github.com/caddyserver/caddy / newResource

Method newResource

modules/caddyhttp/tracing/tracer.go:140–148  ·  view source on GitHub ↗

newResource creates a resource that describe current handler instance and merge it with a default attributes value.

(
	webEngineName,
	webEngineVersion string,
)

Source from the content-addressed store, hash-verified

138
139// newResource creates a resource that describe current handler instance and merge it with a default attributes value.
140func (ot *openTelemetryWrapper) newResource(
141 webEngineName,
142 webEngineVersion string,
143) (*resource.Resource, error) {
144 return resource.Merge(resource.Default(), resource.NewSchemaless(
145 semconv.WebEngineName(webEngineName),
146 semconv.WebEngineVersion(webEngineVersion),
147 ))
148}
149
150// spanNameFormatter performs the replacement of placeholders in the span name
151func (ot *openTelemetryWrapper) spanNameFormatter(operation string, r *http.Request) string {

Callers 1

newOpenTelemetryWrapperFunction · 0.95

Calls 1

DefaultMethod · 0.65

Tested by

no test coverage detected