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

Add ability to enable newrelic's distributed tracing #305

Merged

Conversation

jaysonsantos
Copy link
Contributor

Description

Add ability to enable newrelic's distributed tracing

Motivation and Context

This is a feature within newrelic's agent that is by default off and the only way to enable on go agent is by setting in the config, the other method with the env NEW_RELIC_DISTRIBUTED_TRACING_ENABLED=true won't work as the go agent doesn't read env variables.

How Has This Been Tested?

I've deployed the docker image with the changes a server and checked newrelic's distributed tracing and they showed up.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation. (The docs point to the struct code)
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@codecov-io
Copy link

Codecov Report

Merging #305 into master will increase coverage by 0.02%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #305      +/-   ##
==========================================
+ Coverage   81.83%   81.85%   +0.02%     
==========================================
  Files          26       26              
  Lines        1536     1538       +2     
==========================================
+ Hits         1257     1259       +2     
  Misses        210      210              
  Partials       69       69
Impacted Files Coverage Δ
pkg/config/config.go 79.71% <100%> (+0.6%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ca88144...bdd533c. Read the comment docs.

@@ -93,6 +93,9 @@ func setupNewrelic() {
if Config.NewRelicEnabled {
nCfg := newrelic.NewConfig(Config.NewRelicAppName, Config.NewRelicKey)
nCfg.Enabled = true
// These two cannot be enabled at the same time and cross application is enabled by default
Copy link
Collaborator

Choose a reason for hiding this comment

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

can you link some newrelic documentation for this? Thanks

@jaysonsantos
Copy link
Contributor Author

jaysonsantos commented Dec 3, 2019 via email

@zhouzhuojie zhouzhuojie merged commit 88d0960 into openflagr:master Mar 12, 2020
@jaysonsantos jaysonsantos deleted the newrelic-distributed-tracing branch July 1, 2020 15:12
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.

3 participants