Skip to content

Commit

Permalink
custom_atts
Browse files Browse the repository at this point in the history
  • Loading branch information
dpacheconr committed Oct 10, 2024
1 parent 7c113f0 commit 69ac005
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ env:
NEW_RELIC_LICENSE_KEY: ${{ secrets.NEW_RELIC_LICENSE_KEY }}
GHA_RUN_ID: ${{ github.event.workflow_run.id }}
GHA_RUN_NAME: ${{ github.event.workflow_run.name }}
#GHA_CUSTOM_ATTS ='{ "name":"John", "age":30, "city":"New York"}'
#GHA_CUSTOM_ATTS: '{"mycustomattributea":"test", "mycustomattributeb":10, "mycustomattributec":"My custom attribute"}'
jobs:
Expand Down
2 changes: 1 addition & 1 deletion new-relic-exporter.yaml.example
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ env:
NEW_RELIC_API_KEY: ${{ secrets.NEW_RELIC_API_KEY }}
GHA_RUN_ID: ${{ github.event.workflow_run.id }}
GHA_RUN_NAME: ${{ github.event.workflow_run.name }}
#GHA_CUSTOM_ATTS ='{ "name":"John", "age":30, "city":"New York"}'
#GHA_CUSTOM_ATTS: '{"mycustomattributea":"test", "mycustomattributeb":10, "mycustomattributec":"My custom attribute"}'

jobs:
new-relic-exporter:
Expand Down
2 changes: 1 addition & 1 deletion src/exporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
"github.resource.type": "span"
}

# Example: GHA_CUSTOM_ATTS ='{ "name":"John", "age":30, "city":"New York"}'
# Example: GHA_CUSTOM_ATTS: '{"mycustomattributea":"test", "mycustomattributeb":10, "mycustomattributec":"My custom attribute"}'
# Check for custom attributes
if "GHA_CUSTOM_ATTS" in os.environ:
GHA_CUSTOM_ATTS = os.environ["GHA_CUSTOM_ATTS"]
Expand Down

0 comments on commit 69ac005

Please sign in to comment.