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

Add some runtime metrics of go and nodejs application. #9

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

liyanwei93
Copy link
Collaborator

Changes

Add some runtime metrics of go and nodejs application. At the same time, we will gradually contribute these additional metrics to the community.

Merge Requirements

For new features contributions, please make sure you have completed the following
essential items:

  • CHANGELOG.md updated to document new feature additions
  • Appropriate documentation updates in the docs
  • Appropriate Helm chart updates in the helm-charts

Maintainers will not merge until the above have been completed. If you're unsure
which docs need to be changed ping the
@open-telemetry/demo-approvers.

yanweili and others added 4 commits November 18, 2024 13:19
Add more runtime metrics of go and nodejs application
Add nodejs auto instrumentation
Move runtime metrics monitoring code to a separate place
Remove blank line
@@ -0,0 +1,46 @@
// Copyright The OpenTelemetry Authors
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

name it to runtime_metrics.go, per the naming convention of go.


func recordRuntimeMetrics(meter metric.Meter) error {
// Create metric instruments
gcPause, err := meter.Float64ObservableGauge("go_gc_pause")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we follow the same naming pattern used by other metrics from community semconv, suppose that we will submit pr to community for these missing metrics, and how would we propose the metrics naming that can be acceptable by the community.

@@ -8,11 +8,32 @@
## Note: the spanmetrics exporter must be included in the exporters array
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about create this otel col config file into a separated folder such as /instana, to host everything specific to Instana. With that, it would be a bit easier for us to keep up with the community changes when we sync from upstream.

otlp/instana:
endpoint:
headers:
x-instana-key:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to add some comments here to explain what this means for end users, where to find get it, and why we need this?

@@ -0,0 +1,236 @@
// Copyright The OpenTelemetry Authors
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was usually suggested to use snake_case for node.js filename, e.g.: runtime-metrics.js

@@ -9,6 +9,7 @@ const { FlagdProvider} = require('@openfeature/flagd-provider');
const flagProvider = new FlagdProvider();

const logger = require('./logger');
const runtimeMetrics = require('./runtimeMetrics');
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we instrumented the nodejs app using two approaches at the same time, the one from community vs. the one from our side? Instead of modifying the business code, can we move this to opentelemetry.js?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants