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

Generate spans within our validation lambdas #326

Merged
merged 15 commits into from
May 15, 2024
Merged

Conversation

bripkens
Copy link
Member

@bripkens bripkens commented May 14, 2024

image

Copy link

vercel bot commented May 14, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
otelbin ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 15, 2024 9:57am

Copy link

socket-security bot commented May 15, 2024

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher

🚮 Removed packages: npm/@expo/[email protected], npm/@types/[email protected], npm/@types/[email protected], npm/@types/[email protected], npm/@types/[email protected]

View full report↗︎

Copy link

socket-security bot commented May 15, 2024

👍 Dependency issues cleared. Learn more about Socket for GitHub ↗︎

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

View full report↗︎

@@ -23,7 +24,102 @@ interface Env {

const distroName = process.env.DISTRO_NAME;

export const validateAdot = async (otelcolRealPath: string, configPath: string, env: Env): Promise<void> => {
/**
* Using CommonJS export to allow for AWS lambda layer to work as per the
Copy link
Member Author

Choose a reason for hiding this comment

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

large diff. Only thing changed here is the ESM -> CommonJS migration for auto-instrumentation support.

const { OTLPTraceExporter } = require("@opentelemetry/exporter-trace-otlp-proto");
const { MeterProvider, MeterProviderOptions } = require("@opentelemetry/sdk-metrics");

function defaultConfigureInstrumentations() {
Copy link
Member Author

Choose a reason for hiding this comment

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

For the most part, this is a copy of the official Node.js lambda layer's wrapper file. Unfortunately reusing as dependency is not possible, because it is not published as an NPM package.

Copy link
Member

Choose a reason for hiding this comment

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

suggestion: How about adding a comment to that extent as a maintenance note? So we know which code we vendored-in here an why.

@bripkens bripkens changed the title Lambda telemetry Generate spans within our validation lambdas May 15, 2024
@bripkens bripkens marked this pull request as ready for review May 15, 2024 09:41
@basti1302 basti1302 self-assigned this May 15, 2024
@basti1302 basti1302 self-requested a review May 15, 2024 09:42
Copy link
Member

@basti1302 basti1302 left a comment

Choose a reason for hiding this comment

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

LGTM 👍

const { OTLPTraceExporter } = require("@opentelemetry/exporter-trace-otlp-proto");
const { MeterProvider, MeterProviderOptions } = require("@opentelemetry/sdk-metrics");

function defaultConfigureInstrumentations() {
Copy link
Member

Choose a reason for hiding this comment

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

suggestion: How about adding a comment to that extent as a maintenance note? So we know which code we vendored-in here an why.

Copy link

sonarcloud bot commented May 15, 2024

Quality Gate Passed Quality Gate passed

Issues
2 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@bripkens bripkens merged commit 4c41570 into main May 15, 2024
64 checks passed
@bripkens bripkens deleted the lambda-telemetry branch May 15, 2024 10:15
@github-actions github-actions bot locked and limited conversation to collaborators May 15, 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.

2 participants