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

fix: move faas_id and cloud_account_id to semantic conventions #481

Merged
merged 3 commits into from May 12, 2021
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -32,8 +32,10 @@ import {
SpanStatusCode,
TracerProvider,
} from '@opentelemetry/api';
import { CLOUD_RESOURCE } from '@opentelemetry/resources';
import { SemanticAttributes } from '@opentelemetry/semantic-conventions';
import {
SemanticAttributes,
ResourceAttributes,
} from '@opentelemetry/semantic-conventions';

import { Callback, Context, Handler } from 'aws-lambda';

Expand Down Expand Up @@ -121,8 +123,8 @@ export class AwsLambdaInstrumentation extends InstrumentationBase {
kind: SpanKind.SERVER,
attributes: {
[SemanticAttributes.FAAS_EXECUTION]: context.awsRequestId,
'faas.id': context.invokedFunctionArn,
[CLOUD_RESOURCE.ACCOUNT_ID]: AwsLambdaInstrumentation._extractAccountId(
[ResourceAttributes.FAAS_ID]: context.invokedFunctionArn,
[ResourceAttributes.CLOUD_ACCOUNT_ID]: AwsLambdaInstrumentation._extractAccountId(
Copy link
Member

Choose a reason for hiding this comment

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

FWIW this line is the one lint is complaining about most likely (too long)

context.invokedFunctionArn
),
},
Expand Down