Comments (4)
to record my answers from slack:
I'm using the default serialisation from beeline(-ruby):
https://github.com/honeycombio/beeline-ruby/blob/344928cbfb44269aed23ab9be099cda79a7bab95/lib/honeycomb/propagation.rb#L54-L64
for the dataset and api key config, I'm using the default environment variables used in
https://github.com/honeycombio/beeline-ruby/blob/344928cbfb44269aed23ab9be099cda79a7bab95/lib/honeycomb/configuration.rb#L15-L21
from gha-buildevents.
I've been able to attach the traces from a command to the trace from buildevents. All the data is there, we just have to polish this a bit / define a standard way to propagate context through the environment.
The API key and dataset are already present in the environment since buildevents needs this as well. API key = BUILDEVENT_APIKEY
, dataset = BUILDEVENT_DATASET
.
The trace ID corresponds to the build ID, which is exported by gha-buildevents
as BUILD_ID
.
The parent ID corresponds to the step ID.
My PoC implementation: https://github.com/kvrhdn/tfe-run/blob/honeycomb/main.go#L29
End result, this workflow run: https://github.com/kvrhdn/tfe-run/runs/639591915?check_suite_focus=true
Created this trace 🎉
from gha-buildevents.
I've iterated a bit more on this, I now create a 'trace propagation context' string in gha-buildevents
. This is a string the contains the trace ID, the dataset and more. Example:
1;trace_id=725,parent_id=725,dataset=gha-buildevents_integration,context=
I export this to the environment as HONEYCOMB_TRACE_CONTEXT
. (this is basically the same thing as HTTP_X_HONEYCOMB_TRACE
)
You can import it really easy using most beelines since this normally parse from HTTP headers.
Example in Go: https://github.com/kvrhdn/tfe-run/blob/honeycomb/main.go#L51
Advantages of this system:
- It's fairly standardized, every beeline should be able to parse this.
Besides, I think it should be possible to extend most beelines with a functionGetTraceFromEnvironment
. - It's high bandwidth: one string contains all data (except for the API key, but I'd argue it's best to inject this per step)
Disadvantages:
- This is not really compatible with how
buildevents
works right now. The commandscmd
andstep
expect you to manually define aSTEP_ID
. It does not check for an environment variable nor does it set one.
We could makebuildevents cmd
propagation context-aware, but I'm not sure how this would work withstep
...
A workaround would be to not use buildevents step
anymore, in favour of a custom action like gha-buildevent-step
#5
from gha-buildevents.
I'm closing this issue here since I'm in favor of implementing this in buildevents itself, see honeycombio/buildevents#74.
from gha-buildevents.
Related Issues (20)
- Add parameter continue-on-error HOT 1
- Be able to deal with slashes '/' in dataset names HOT 2
- Job using matrix report spans in same trace HOT 4
- run_number is not unique enough for trace_id HOT 5
- Improve documentation
- Create buildevents.txt at the start of the run
- Make BUILDEVENTS_FILE an absolute path HOT 2
- Make buildevents download configurable HOT 3
- Support other architectures
- Allow calling this action without generating an event HOT 3
- [Request]: gracefully stub out non-supported platforms, provide customizable points for custom binary HOT 1
- Test question
- test issue
- test asana gh action
- Allowing custom TRACE_ID to be set HOT 2
- This trace has multiple spans sharing the same non-null span ID. HOT 1
- Automatic instrumentation of workflows?
- Update to run using node20
- The `set-output` command is deprecated and will be disabled soon HOT 1
- Generate Spans for jobs in multi-job flows
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gha-buildevents.