Skip to content

feat: introduce internal profiling #118

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

Merged
merged 10 commits into from
May 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/early-owls-build.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@hyperdx/node-opentelemetry': patch
---

feat: introduce internal profiling
2 changes: 1 addition & 1 deletion .changeset/loud-actors-boil.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
'@hyperdx/node-opentelemetry': patch
'@hyperdx/node-opentelemetry': minor
---

style: deprecate hyperdx debug flag
2 changes: 1 addition & 1 deletion packages/node-opentelemetry/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ npx ts-node -r './instrument.ts' index.ts

### Troubleshooting

If you are having trouble getting events to show up in HyperDX, you can enable verbose logging by setting the environment variable `DEBUG=hyperdx`. This will print out additional debug logging to isolate any issues.
If you are having trouble getting events to show up in HyperDX, you can enable verbose logging by setting the environment variable `OTEL_LOG_LEVEL=debug`. This will print out additional debug logging to isolate any issues.

If you're pointing to a self-hosted collector, ensure the `OTEL_EXPORTER_OTLP_ENDPOINT` environment variable is set to the correct endpoint (ex. `http://localhost:4318`) and is reachable (ex. `curl http://localhost:4318/v1/traces` should return a HTTP 405).

Expand Down
2 changes: 2 additions & 0 deletions packages/node-opentelemetry/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,5 @@ export const DEFAULT_HDX_NODE_STOP_ON_TERMINATION_SIGNALS =
stringToBoolean(env.HDX_NODE_STOP_ON_TERMINATION_SIGNALS) ?? true;
export const DEFAULT_HDX_NODE_EXPERIMENTAL_EXCEPTION_CAPTURE =
stringToBoolean(env.HDX_NODE_EXPERIMENTAL_EXCEPTION_CAPTURE) ?? false;
export const DEFAULT_HDX_NODE_ENABLE_INTERNAL_PROFILING =
stringToBoolean(env.HDX_NODE_ENABLE_INTERNAL_PROFILING) ?? false;
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ export const _parseConsoleArgs = (args: any[]) => {
: stringifiedArgs.join(' ');
};

// FIXME: this should extend InstrumentationBase
export default class HyperDXConsoleInstrumentation {
private readonly betaMode: boolean;

Expand Down
Loading