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

start API improvements #967

Merged
merged 2 commits into from
Nov 11, 2024
Merged

start API improvements #967

merged 2 commits into from
Nov 11, 2024

Conversation

seemk
Copy link
Contributor

@seemk seemk commented Nov 6, 2024

  • instrument script now uses the start call instead of duplicating the logic.
  • New option for start:resource - a method which is called with the detected environment resource. Users can return their own resource from this function, which gets passed to all signals (instead of doing it separately for all signals - where the API for it differed).
  • New option for start: realm - when specified the realm is passed to the underlying signals. Only applicable for traces and metrics at the moment as logs and profiling data can't be sent directly over OTLP.
  • Resource detection is now cached. Previously each signal called the same detection routines.
  • When http/protobuf (the default setting) is enabled and endpoint option is set, signals now attach the resource path to the endpoint. E.g. start({ endpoint: 'http://localhost:4318' }); means /v1/traces, /v1/metrics and /v1/logs resource paths are automatically appended.

@seemk seemk requested review from a team as code owners November 6, 2024 14:32
@seemk seemk merged commit a3df29a into main Nov 11, 2024
83 checks passed
@seemk seemk deleted the api-improvement branch November 11, 2024 08:29
@github-actions github-actions bot locked and limited conversation to collaborators Nov 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants