-
Notifications
You must be signed in to change notification settings - Fork 19
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
Provide a mechanism to add arbitrary fields to the Honeycomb event #3
Comments
It could be interesting to allow steps to add to this file as well. I.e. in case we make a - uses: kvrhdn/gha-buildevents-step@master
with:
name: My step
additional-fields:
buildResult: success |
That would be great! As it stands, even trying to used the buildevent file is not really reliable as some spans don't pick up the values. |
I currently don't have any bandwidth to work on this, but I'll leave some notes here for anyone that wants to pick this up. This issue can be divided into two problems:
For 2) we already have some infrastructure in place: buildevents already reads a file
For 1) there is currently no solution. Additionally, I think the action inputs are currently limited to strings only. So the following is not possible: - uses: kvrhdn/gha-buildevents
with:
# snip
additional-fields:
- app: my-app
- version: 0.0.1 Instead, we'll have to pass a text block I think: - uses: kvrhdn/gha-buildevents
with:
# snip
additional-fields: |
app=my-app
version=0.0.1 But... can we validate this? (Do we have to validate this?) I did something similar in my tfe-run action to pass a list of variables to Terraform: |
This allows users of this action to specify additional fields through the file at $BUILDEVENT_FILE. Any values specified in there override the defaults provided by gha-buildevents. This fixes honeycombio#3.
I was thinking about a simpler alternative: #18 changes the |
This allows users of this action to specify additional fields through the file at $BUILDEVENT_FILE. Any values specified in there override the defaults provided by gha-buildevents. This fixes honeycombio#3.
Yeah, I think this will work well. gha-buildevents will only create a |
Oh, that's a good point, I didn't consider this case. It might be worthwhile pointing that out in documentation that it's recommended to "set and forget" the value for BUILDEVENT_FILE at the very top-level to avoid any weird interactions. Given that I'd expect most folks to use a top-level |
buildevents
allows you to provide arbitrary key-value data using theBUILDEVENT_FILE
environment variable.gha-buildevents
uses this to send metadata about the GitHub Actions workflow.We should provide a mechanism to allow users to provide additional fields.
This syntax would be great:
The text was updated successfully, but these errors were encountered: