MCPcopy Create free account
hub / github.com/dagger/dagger / Resource

Method Resource

engine/clientdb/span.go:185–191  ·  view source on GitHub ↗

Resource returns the resource associated with the span

()

Source from the content-addressed store, hash-verified

183
184// Resource returns the resource associated with the span
185func (ros *readOnlySpan) Resource() *resource.Resource {
186 res := &otlpresourcev1.Resource{}
187 if err := protojson.Unmarshal(ros.DB.Resource, res); err != nil {
188 slog.Warn("failed to unmarshal resource", "error", err)
189 }
190 return resource.NewSchemaless(telemetry.AttributesFromProto(res.Attributes)...)
191}
192
193// InstrumentationLibrary returns the instrumentation library.
194//

Callers 3

recordOTelSpanMethod · 0.80
ExportSpansMethod · 0.80
insertLogRecordParamFunction · 0.80

Calls 2

UnmarshalMethod · 0.65
WarnMethod · 0.65

Tested by

no test coverage detected