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

Does not work with custom metrics #847

Open
stevemao opened this issue Feb 2, 2024 · 6 comments
Open

Does not work with custom metrics #847

stevemao opened this issue Feb 2, 2024 · 6 comments

Comments

@stevemao
Copy link

stevemao commented Feb 2, 2024

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

Metrics is not exported.

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

Step 1. follow
https://aws-otel.github.io/docs/getting-started/lambda/lambda-js
All default config. metrics should be exported to log which should be visible on cloudwatch

Step 2.
Add

import { metrics } from '@opentelemetry/api';

// Create a meter
export const meter = metrics.getMeter('your-metric-name');

// Define a counter metric
export const requestCounter = meter.createCounter('my-requests', {
  description: 'Counts number of requests processed',
});

requestCounter.add(1, { functionName: context.functionName });

In my lambda

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

metrics in log which should be in cloudwatch

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

no metrics. I can see traces in xray

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

latest

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

Nodejs

Additional context
Add any other context about the problem here.

Copy link

github-actions bot commented May 5, 2024

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 May 5, 2024
@stevemao
Copy link
Author

stevemao commented May 5, 2024

Not stale

@github-actions github-actions bot removed the stale label May 12, 2024
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 Aug 11, 2024
@stevemao
Copy link
Author

Not stale

@github-actions github-actions bot removed the stale label Aug 18, 2024
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 Nov 17, 2024
@stevemao
Copy link
Author

Not stale

@github-actions github-actions bot removed the stale label Nov 24, 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