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

[NA] Remove New Relic dependency #254

Merged
merged 17 commits into from
Oct 14, 2024

Conversation

thiagohora
Copy link
Contributor

@thiagohora thiagohora commented Sep 16, 2024

Details

In order to make it work, we only need to set the disable envvar to false and the the following variables:

      OTEL_EXPORTER_OTLP_ENDPOINT: https://otlp.nr-data.net:4317
      OTEL_EXPORTER_OTLP_HEADERS: "api-key=xxxxxxxxx"

Issues

Screenshot 2024-09-17 at 23 45 11

Resolves #

Testing

The integration was tested locally using a custom API key from our OTEL provider.

Documentation

@thiagohora thiagohora self-assigned this Sep 16, 2024
@thiagohora thiagohora marked this pull request as ready for review September 16, 2024 14:37
@thiagohora thiagohora requested a review from a team as a code owner September 16, 2024 14:37
Nimrod007
Nimrod007 previously approved these changes Sep 16, 2024
apps/opik-backend/entrypoint.sh Outdated Show resolved Hide resolved
Copy link
Collaborator

@andrescrz andrescrz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change looks generally good to me, just a minor recommendation about the configuration.

Please fill up the description template of this PR. I'm missing information, specially about:

  • How was this tested?
  • Any test follow-up actions after deploying?
  • What infrastructure do we need to deploy in order for this to work? Do we require deploying the OTEL agent priorly.
  • Does this work directly with New Relic? Or are there any follow-up actions?
  • What about Prometheus/Grafana?

apps/opik-backend/config.yml Outdated Show resolved Hide resolved
@thiagohora
Copy link
Contributor Author

The change looks generally good to me, just a minor recommendation about the configuration.

Please fill up the description template of this PR. I'm missing information, specially about:

  • How was this tested?
  • Any test follow-up actions after deploying?
  • What infrastructure do we need to deploy in order for this to work? Do we require deploying the OTEL agent priorly.
  • Does this work directly with New Relic? Or are there any follow-up actions?
  • What about Prometheus/Grafana?

Hi @andrescrz

  1. All the changes were tested locally using a test APIKEY and pointing to our provider, New Relic.
  2. Next step is to enable it in Staging and validate the setup
  3. The agent is automatically downloaded during the application startup. As we are sending data to New Relic, no infra is needed unless we also want to send it to Grafana.
  4. Yes, it works out-of-the-box by pointing to the New Relic backend (More in the PR description)
  5. Grafana seems to be instrumented via the Kubernetes cluster so far. As I mentioned, we can also send application data to it, but we are not currently doing it, so I would address this in this PR. Maybe @liyaka can clarify it.

@thiagohora thiagohora force-pushed the thiagohora/use_opentelemetry_instead_of_new_relic branch from b0baad7 to b502e45 Compare September 17, 2024 21:13
Nimrod007
Nimrod007 previously approved these changes Sep 18, 2024
andrescrz
andrescrz previously approved these changes Sep 18, 2024
Copy link
Collaborator

@andrescrz andrescrz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, please make sure this is completely enabled after your testing in staging and before going to production.

We don't want to miss the current instrumentation if any problem arises in production.

@thiagohora thiagohora dismissed stale reviews from andrescrz and Nimrod007 via 789eb74 September 18, 2024 13:56
@thiagohora thiagohora force-pushed the thiagohora/use_opentelemetry_instead_of_new_relic branch from 5b9866b to 789eb74 Compare September 18, 2024 13:56
andrescrz
andrescrz previously approved these changes Sep 19, 2024
Copy link
Collaborator

@andrescrz andrescrz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's better that you move ahead and merge this soon, no need to wait. I changed my mind as we can deploy specific tags.

Comment on lines +62 to +65
<dependency>
<groupId>io.opentelemetry.instrumentation</groupId>
<artifactId>opentelemetry-r2dbc-1.0</artifactId>
<version>${opentelmetry.version}-alpha</version>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found mutiple opentelemetry libraries for R2DBC. This seems to be an early one in alpha state. Why this choice over others?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the agent instrumentation, and all modules are in alpha: https://mvnrepository.com/artifact/io.opentelemetry.instrumentation/opentelemetry-r2dbc-1.0. Here is the definition of alpha:

https://github.com/open-telemetry/opentelemetry-java/blob/main/VERSIONING.md#stable-vs-alpha. Basically, they mention such modules don't have backward compatibility guarantees and a few other problems that may require changes from version to version, but that doesn't mean they are not mature.

Nimrod007
Nimrod007 previously approved these changes Sep 19, 2024
@thiagohora thiagohora dismissed stale reviews from Nimrod007 and andrescrz via 295472c September 26, 2024 11:51
@thiagohora
Copy link
Contributor Author

Fixed all issues by setting some envious. I will merge it on Monday

@thiagohora thiagohora merged commit fd0fc81 into main Oct 14, 2024
9 checks passed
@thiagohora thiagohora deleted the thiagohora/use_opentelemetry_instead_of_new_relic branch October 14, 2024 08:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants