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

[nodejs lambda layer] no metrics is exported to cloudwatch logs #836

Open
stevemao opened this issue Jan 23, 2024 · 2 comments
Open

[nodejs lambda layer] no metrics is exported to cloudwatch logs #836

stevemao opened this issue Jan 23, 2024 · 2 comments

Comments

@stevemao
Copy link

stevemao commented Jan 23, 2024


name: Bug report
about: Create a report to help us improve
title: ''[nodejs lambda layer] no metrics is exported to cloudwatch logs"
labels: bug
assignees: ''


Describe the bug
A clear and concise description of what the bug is.

I have added the adot layer in the lambda

adotInstrumentation: {
      layerVersion: AdotLayerVersion.fromJavaScriptSdkLayerVersion(AdotLambdaLayerJavaScriptSdkVersion.LATEST),
      execWrapper: AdotLambdaExecWrapper.REGULAR_HANDLER,
    },

everything else is just default

I'm able to see tracing in xray so the setup is correct

I then add the metrics collector in the source code of the lambda

import { metrics } from '@opentelemetry/api';
const meter = metrics.getMeter('default');

// other code

// in the handler
        const counter = meter.createCounter('mymetric');
        counter.add(1, { success: true });

I can see surrounding logs around this code so the code has bee executed.

In cloudwatch, I do not see this metric.

Steps to reproduce
If possible, provide a recipe for reproducing the error.

What did you expect to see?
A clear and concise description of what you expected to see.

In cloudwatch, I should see this metric as a log

What did you see instead?
A clear and concise description of what you saw instead.

Only surrounding logs

What version of collector/language SDK version did you use?
Version: (e.g., v0.58.0, v1.11.0, etc)

latest layer

What language layer did you use?
Config: (e.g., Java, Python, etc)

nodejs/typescript

Additional context
Add any other context about the problem here.

Tasks

No tasks being tracked yet.
Copy link

This issue is stale because it has been open 90 days with no activity. If you want to keep this issue open, please just leave a comment below and auto-close will be canceled

@github-actions github-actions bot added the stale label Apr 28, 2024
@stevemao
Copy link
Author

Not stale

@github-actions github-actions bot removed the stale label May 5, 2024
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

No branches or pull requests

1 participant