Skip to content

Conversation

@duncanpharvey
Copy link
Collaborator

@duncanpharvey duncanpharvey commented Mar 26, 2025

What does this PR do?

Adds metric origins for Serverless. This will affect the Lambda Extension and Serverless Compatibility Layer.

Currently all metrics (custom and standard) are bucketed into the serverless origin product. At the moment, we just want to be able to differentiate custom metrics by their source.

Motivation

https://datadoghq.atlassian.net/browse/SVLS-3545

Additional Notes

Migrated from DataDog/libdatadog#876

  • All Metrics sent from this DogStatsD server will have Origin Product: Serverless
  • Origin Subproduct (aka OriginCategory) maps based on metric tag
    • origin: appservice -> AppServicesMetrics
    • origin: cloudrun -> CloudRunMetrics
    • origin: containerapp -> ContainerAppMetrics
    • origin: azurefunction -> AzureFunctionsMetrics
    • function_arn: * -> LambdaMetrics
  • Product Detail (aka OriginService) maps based on metric name
    • datadog.* -> None
    • runtime.* -> ServerlessRuntime
    • jvm.* -> ServerlessRuntime
    • aws.lambda.* -> ServerlessEnhanced
    • gcp.run.* -> ServerlessEnhanced
    • azure.app_service.* -> ServerlessEnhanced waiting to add until enhanced metrics with this prefix are created
    • azure.app_containerapp.* -> ServerlessEnhanced waiting to add until enhanced metrics with this prefix are created
    • azure.functions.* -> ServerlessEnhanced waiting to add until enhanced metrics with this prefix are created
    • Else -> ServerlessCustom

Describe how to test/QA your changes

@duncanpharvey
Copy link
Collaborator Author

Still needs logic to set the metric metadata differently depending on whether the metric is a runtime metric (prefix runtime.* or jvm.*) or a custom metric (all other prefixes)

@duncanpharvey duncanpharvey requested a review from duncanista July 9, 2025 16:25
@duncanpharvey duncanpharvey merged commit 9bfe983 into main Jul 9, 2025
26 checks passed
@duncanpharvey duncanpharvey deleted the duncan-harvey/metric-origins branch July 9, 2025 17:05
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.

5 participants