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

NH-65075 Add support for SW_APM_TRANSACTION_NAME #206

Merged
merged 6 commits into from
Oct 20, 2023

Conversation

tammy-baylis-swi
Copy link
Contributor

Adds support for environment variable SW_APM_TRANSACTION_NAME or JSON config file "transactionName" to apply one custom name to all transactions. This is being introduced now for lambda instrumentation but is available outside of lambda too.

Precendence in decreasing order:

  1. In-code call to existing solarwinds_apm.api.set_transaction_name
  2. Environment variable SW_APM_TRANSACTION_NAME or config file KV
  3. Then c-lib calculation of final txn name based on Otel span ingredients provided by language agent.

Tested manually with testbed flask_apm_api_app. When the set_transaction_name call is commented out and SW_APM_TRANSACTION_NAME is set, the env var is used to name the transactions. When API call commented back in, the API's name is used.

@tammy-baylis-swi tammy-baylis-swi requested a review from a team October 20, 2023 17:19
tests/unit/test_inbound_metrics_processor.py Dismissed Show dismissed Hide dismissed
tests/unit/test_inbound_metrics_processor.py Dismissed Show dismissed Hide dismissed
tests/unit/test_inbound_metrics_processor.py Fixed Show fixed Hide fixed
xuan-cao-swi
xuan-cao-swi previously approved these changes Oct 20, 2023
@tammy-baylis-swi
Copy link
Contributor Author

Needed a quick tidy and changelog update in f68ec42. @xuan-cao-swi may I please have another look? 😃

@tammy-baylis-swi tammy-baylis-swi merged commit 2097e6f into main Oct 20, 2023
11 checks passed
@tammy-baylis-swi tammy-baylis-swi deleted the NH-65075-env-txn-name-support branch October 20, 2023 18:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants