Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot use otel.library.name in TraceQL #2352

Closed
nabadger opened this issue Apr 20, 2023 · 6 comments
Closed

Cannot use otel.library.name in TraceQL #2352

nabadger opened this issue Apr 20, 2023 · 6 comments
Labels
stale Used for stale issues / PRs traceql

Comments

@nabadger
Copy link

Hi,

I would like to know if this is possible or not?

Currently I cannot seem to query "otel.library.name" or "otel.library.version", although I can see them as attributes in the trace.

I've tried following https://grafana.com/docs/tempo/latest/traceql/#selecting-spans and I've seen reference that these are intrinsic fields, but other fields of the same type do seem to work.

Thanks

@mdisibio
Copy link
Contributor

mdisibio commented Apr 20, 2023

Hi, I think this may be the same as #2189 Can you confirm if otel.library.name are actually attributes in the Scope or InstrumentationLibrary by downloading the trace as json? Otherwise there should be no issue accessing them if they are resource-level or span-level attributes (for example service.name and http.status_code work fine)

@nabadger
Copy link
Author

In my example, these appear to be under scopeSpans for me.

{
  "scopeSpans": [
    {
      "scope": {
        "name": "opentelemetry.instrumentation.django",
        "version": "0.38b0"
      },
      "spans": [
        { ...
        }
      ]
    }
  ]
}

In Grafana, under Resource Attributes I have:

  • otel.library.name = opentelemetry.instrumentation.django
  • otel.library.version = 0.38b0

@joe-elliott
Copy link
Member

This is due to Grafana rendering these attributes incorrectly. We are asking for them to be fixed here:

grafana/grafana#59607

However, even if Grafana renders these correctly, they are still not referenceable in TraceQL. Currently there is no way to reference any values at the "scope" level.

@nabadger
Copy link
Author

Thanks both for the replies :)

@github-actions
Copy link
Contributor

This issue has been automatically marked as stale because it has not had any activity in the past 60 days.
The next time this stale check runs, the stale label will be removed if there is new activity. The issue will be closed after 15 days if there is no new activity.
Please apply keepalive label to exempt this Issue.

@github-actions github-actions bot added the stale Used for stale issues / PRs label Jul 15, 2023
@joe-elliott
Copy link
Member

Closing in favor of #2189

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Used for stale issues / PRs traceql
Projects
None yet
Development

No branches or pull requests

3 participants