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

[🐛 Bug]: opentelemetry-exporter-otlp not found on classpath #1883

Closed
Doofus100500 opened this issue Jun 30, 2023 · 13 comments · Fixed by SeleniumHQ/selenium#12528
Closed
Labels

Comments

@Doofus100500
Copy link
Contributor

What happened?

Hi, i'm trying to write traces in OpenTelemetry

Command used to start Selenium Grid with Docker

I'm using helm chart v. 0.19.0 to start Grid in distributed mode in Kubernetes. In values file i add:
  extraEnvironmentVariables:
    - name: SE_JAVA_OPTS
      value: "-Dotel.traces.exporter=otlp -Dotel.exporter.otlp.endpoint=https://some.host -Dotel.resource.attributes=service.name=SomeTeam.selenium-grid"

Relevant log output

io.opentelemetry.sdk.autoconfigure.spi.ConfigurationException: otel.traces.exporter set to "otlp" but opentelemetry-exporter-otlp not found on classpath. Make sure to add it as a dependency.

Operating System

k8s

Docker Selenium version (tag)

selenium-grid-4.10.0-20230607

@github-actions
Copy link

@Doofus100500, thank you for creating this issue. We will troubleshoot it as soon as we can.


Info for maintainers

Triage this issue by using labels.

If information is missing, add a helpful comment and then I-issue-template label.

If the issue is a question, add the I-question label.

If the issue is valid but there is no time to troubleshoot it, consider adding the help wanted label.

If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, MSEdgeDriver, W3C), add the applicable G-* label, and it will provide the correct link and auto-close the issue.

After troubleshooting the issue, please add the R-awaiting answer label.

Thank you!

@diemol
Copy link
Member

diemol commented Jun 30, 2023

Seems you are missing SE_ENABLE_TRACING=true

https://github.com/SeleniumHQ/docker-selenium#tracing-in-grid

@diemol diemol closed this as not planned Won't fix, can't repro, duplicate, stale Jun 30, 2023
@Doofus100500
Copy link
Contributor Author

Seems you are missing SE_ENABLE_TRACING=true

https://github.com/SeleniumHQ/docker-selenium#tracing-in-grid

No, i have this:
- name: SE_ENABLE_TRACING value: "true"

@diemol
Copy link
Member

diemol commented Jun 30, 2023

I didn't know, you did not post it.

Seems the dependencies in the images are out of date, we will check this for the next release.

@diemol diemol reopened this Jun 30, 2023
@Doofus100500
Copy link
Contributor Author

I didn't know, you did not post it.

Seems the dependencies in the images are out of date, we will check this for the next release.

Thanks a lot, looking forward to it

@madhankumar866
Copy link

madhankumar866 commented Jul 27, 2023

Try This one it's working

chart v. 0.19.0 Distributed mode in Kubernetes

  extraEnvironmentVariables:
    - name: SE_ENABLE_TRACING
      value: "true"  
    - name: JAVA_OPTS
      value: "-Dotel.traces.exporter=jaeger -Dotel.exporter.jaeger.endpoint=http://jaegar-collector:14250 -Dotel.resource.attributes=service.name=selenium-grid"

@Doofus100500
Copy link
Contributor Author

I didn't know, you did not post it.

Seems the dependencies in the images are out of date, we will check this for the next release.

Try it with new release, nothing changed(

@diemol
Copy link
Member

diemol commented Aug 8, 2023

Probably we need to add this as a dependency in the Docker image. Can you help us with a pull request please?

@hannahchan
Copy link

👋 Hi,

I've encountered the same error message and thought I should share what I've found is going on. Under-the-hood WebDriver using the OpenTelemetry Java auto instrumentation agent/library.

Introduced in OpenTelemetry for Java 1.27 was a change to default the value of otel.logs.exporter from none to otlp. This change breaks WebDriver tests because the WebDriver libraries and test projects do not have the required libraries in the class path to support OTLP logging. As far as I can tell, WebDriver has no use case to do logging via OTLP.

The latest version of WebDriver doesn't seem to have fixed this.

There are three options to workaround this;

  • Add the required OpenTelemetry libraries to the WebDriver test projects
  • Set the system property otel.logs.exporter to none before running any WebDriver tests
  • Disabled tracing on the WebDriver client

I'm not sure what the fix in the WebDriver library could be.

@diemol
Copy link
Member

diemol commented Aug 10, 2023

Thank you for sharing your insights, @hannahchan.

I am in the process of updating Java dependencies, and as part of that, I am setting the otel.logs.exporter to "none", which solves this issue.

SeleniumHQ/selenium#12528

@Doofus100500
Copy link
Contributor Author

I could be wrong, but shouldn't we add io.opentelemetry:opentelemetry-exporter-otlp:1.26.0 here to make everything work?
https://github.com/SeleniumHQ/docker-selenium/blob/trunk/Base/Dockerfile#L92

@diemol
Copy link
Member

diemol commented Aug 10, 2023

Either could work. However, we need to add that dependency directly in Selenium, which we want to avoid.

Copy link

github-actions bot commented Dec 9, 2023

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked and limited conversation to collaborators Dec 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants