opentelemetry-ruby icon indicating copy to clipboard operation
opentelemetry-ruby copied to clipboard

feat: Add basic support for schema_url

Open ahayworth opened this issue 3 years ago • 1 comments

This adds basic schema URL support in the API + SDK, specifically in and around Resources, Tracers, Tracer Provider, and the OTLP exporter.

Some notes, in no particular order:

  • I did not add schema URLs to any of our instrumentation, because that was a lot of work.
  • The API ProxyTracer tests around "asking for a tracer multiple times returns the same thing" don't actually work, because we don't do anything with the name+version(+schema url, after this change) that you pass in. I don't think that matters, but I'm not really sure.
  • I didn't add the schema information to the jaeger/zipkin exporters, after surveying what Go and Python were doing. I don't see an easy place to add it in, either.

Questions:

  1. The behavior of merging two resources with different, non-empty schema URLs is implementation dependent. I chose to drop the schema URL in that case and continue merging resources as before. Is this what we want? Other SDKs do things differently (Go returns an error, Python logs an error and returns the old resource, etc).
  2. I did not add support to the Configurator for setting the schema_url on the default Resource that gets initialized. That seemed like the kind of thing folks would do incorrectly, but you can still do such a thing by creating and assigning an entire Resource if you wish. Is this what we want?

ahayworth avatar May 09 '22 23:05 ahayworth

Tests should pass after #1236 is merged.

ahayworth avatar May 09 '22 23:05 ahayworth

👋 This pull request has been marked as stale because it has been open with no activity. You can: comment on the issue or remove the stale label to hold stale off for a while, add the keep label to hold stale off permanently, or do nothing. If you do nothing this pull request will be closed eventually by the stale bot

github-actions[bot] avatar Mar 12 '24 01:03 github-actions[bot]