Skip to content

Conversation

cade-conklin
Copy link

Links

Example of python agent environment variables
Example of python agent setting Span Event env vars

Details

Issue

The Go Agent does not control sending spans through environment variables

Goals

Allow the Go Agent to control sending spans through environment variables

Implementation

  • Added MaxSamplesStored field to Config.SpanEvents
  • Added logic to assign values to Config.SpanEvents.MaxSamplesStored and Config.SpanEvents.Enabled via environment variables

How to test

In progress...

@github-actions github-actions bot requested a review from mirackara September 29, 2025 22:23
@codecov-commenter
Copy link

codecov-commenter commented Sep 29, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.13%. Comparing base (f3a9aca) to head (4a06568).
⚠️ Report is 2 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #1096      +/-   ##
===========================================
+ Coverage    78.09%   78.13%   +0.04%     
===========================================
  Files          159      159              
  Lines        15854    15913      +59     
===========================================
+ Hits         12381    12434      +53     
- Misses        3060     3065       +5     
- Partials       413      414       +1     

see 4 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

assignBool(&cfg.CustomInsightsEvents.CustomAttributesEnabled, "NEW_RELIC_APPLICATION_LOGGING_FORWARDING_CUSTOM_ATTRIBUTES_ENABLED")

// Span Event Env Variables
assignBool(&cfg.SpanEvents.Enabled, "NEW_RELIC_SPAN_EVENTS_ENABLED")
Copy link
Author

Choose a reason for hiding this comment

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

@mirackara I added in this line to allow for control for enabling span events through env vars. Should I add a function for this as well?

@cade-conklin cade-conklin force-pushed the cconklin/span-events-max-samples-stored branch from ff861ca to 1cd6e7b Compare October 7, 2025 22:29
@cade-conklin cade-conklin marked this pull request as draft October 13, 2025 23:03
@cade-conklin cade-conklin marked this pull request as ready for review October 14, 2025 23:20
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