Resource returns the resource associated with the span
()
| 183 | |
| 184 | // Resource returns the resource associated with the span |
| 185 | func (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 | // |
no test coverage detected