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

feat(unstable): add metrics to otel #27143

Merged
merged 1 commit into from
Dec 2, 2024
Merged

feat(unstable): add metrics to otel #27143

merged 1 commit into from
Dec 2, 2024

Conversation

devsnek
Copy link
Member

@devsnek devsnek commented Nov 29, 2024

Refs: #26852

Initial support for exporting metrics.

ext/telemetry/lib.rs Show resolved Hide resolved
ext/telemetry/lib.rs Show resolved Hide resolved
Comment on lines +789 to +795
let x = v8::ValueView::new(scope, string);
match x.data() {
v8::ValueViewData::OneByte(bytes) => {
String::from_utf8_lossy(bytes).into_owned()
}
v8::ValueViewData::TwoByte(bytes) => String::from_utf16_lossy(bytes),
}
Copy link
Member

Choose a reason for hiding this comment

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

Is there a reason to do it instead of v8::String::to_rust_string_lossy()?

Copy link
Member Author

Choose a reason for hiding this comment

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

spans.on_end(temporary_span.0);
}

pub struct TemporaryMetricsExport {
Copy link
Member

Choose a reason for hiding this comment

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

Could you add some docstrings here about the purpose of these structs and enums?

ext/telemetry/lib.rs Show resolved Hide resolved
@devsnek devsnek merged commit 7c03677 into main Dec 2, 2024
17 checks passed
@devsnek devsnek deleted the metrics branch December 2, 2024 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants