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

[DO NOT MERGE] Application Signals GA Tracking #1133

Closed
wants to merge 9 commits into from

Conversation

bjrara
Copy link
Collaborator

@bjrara bjrara commented Apr 11, 2024

Please DO NOT MERGE this PR.

Description of the issue

Previous, we introduced different metric schema on different platforms. However, this design involves two major defects:

  1. Composite environment dimensions on EKS/K8S can't be used when communicating with systems asking for one key as the unique identifier.
  2. It may result in breaking change when we introduce a new platform while existing customers are running on generic set up.

Description of changes

In this PR, we

  1. unify the log group name to /aws/application-signals/data.
  2. rename Application Signals metric namespace.
  3. unify the metric schema across platforms by replacing HostedIn. with Environment.
  4. rename K8s.RemoteNamespace to RemoteEnvironment to make it consistent with local Environment.
  5. refine the dimensions for remote target by changing it to a set of RemoteResource* dimensions.
  6. enforce basic validations
  7. fix bugs

In addition, the replacement metric rewriting rule is also updated to allow adding new predefined Application Signals dimensions to the existing metric.

This PR needs to work together with other PRs:

  1. Update ApplicationSignals log group name and adjust AWS service name amazon-contributing/opentelemetry-collector-contrib#197
  2. Metric Schema and config name changes aws-observability/aws-otel-java-instrumentation#786
  3. Metric Schema changes aws-observability/aws-otel-python-instrumentation#150
  4. Update app_signals to application_signals amazon-cloudwatch-agent-operator#172
  5. Update app_signals to application_signals aws-observability/helm-charts#40
  6. [GA] ApplicationSignals attribute renaming and validation #1151
  7. [GA] Autofill ECS cluster info if it's missing #1180

License

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Tests

Describe what tests you have done.

Requirements

Before commit the code, please do the following steps.

  1. Run make fmt and make fmt-sh
  2. Run make lint

@bjrara bjrara requested a review from a team as a code owner April 11, 2024 16:25
@bjrara bjrara force-pushed the metric_schema_merge branch from d000725 to 94b1f89 Compare April 11, 2024 16:29
@bjrara bjrara requested review from mxiamxia and lisguo April 11, 2024 16:36
@bjrara bjrara force-pushed the metric_schema_merge branch from 94b1f89 to 6b24d0c Compare April 11, 2024 16:38
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 80.14184% with 28 lines in your changes are missing coverage. Please review.

Project coverage is 65.43%. Comparing base (96d4763) to head (6b24d0c).
Report is 541 commits behind head on main.

Files Patch % Lines
...sors/awsappsignals/internal/resolver/kubernetes.go 74.35% 8 Missing and 2 partials ⚠️
...anslate/otel/processor/awsappsignals/translator.go 65.00% 6 Missing and 1 partial ⚠️
...ugins/processors/awsappsignals/config/resolvers.go 0.00% 5 Missing ⚠️
...lator/translate/otel/exporter/awsemf/translator.go 80.00% 2 Missing and 1 partial ⚠️
...appsignals/internal/resolver/attributesresolver.go 95.00% 2 Missing ⚠️
plugins/processors/awsappsignals/factory.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1133      +/-   ##
==========================================
+ Coverage   57.58%   65.43%   +7.84%     
==========================================
  Files         370      357      -13     
  Lines       17548    18819    +1271     
==========================================
+ Hits        10105    12314    +2209     
+ Misses       6848     5901     -947     
- Partials      595      604       +9     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@bjrara bjrara force-pushed the metric_schema_merge branch 5 times, most recently from a2a14b9 to 349ce06 Compare April 17, 2024 18:55
lisguo
lisguo previously approved these changes Apr 18, 2024
}
}
}
if _, ok := attributes.Get(attr.AWSLocalEnvironment); !ok {
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: This could be in the block above.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The check is intentionally done outside the previous block to set a default environment wherever the default environment is not set.

Comment on lines +159 to +162
case config.ModeEC2, config.ModeECS:
return appSignalsConfigGeneric
default:
return appSignalsConfigGeneric
Copy link
Contributor

Choose a reason for hiding this comment

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

What is the difference between these? Do we need to have the config.ModeEC2, config.ModeECS checks?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

For ECS, it's for putting a placeholder so that we don't miss anything we adding full support for the platform.

@@ -10,6 +10,10 @@ const (
ModeWithIRSA = "withIRSA"
)

const (
ModeECS = "ECS"
Copy link
Contributor

Choose a reason for hiding this comment

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

If this is only going to be used in the EMF translator, then keep it there. Want to make sure we don't accidentally set the translator context to ECS since that would break a lot of things.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It's used in EMF and applicationsignals translator.

@bjrara bjrara force-pushed the metric_schema_merge branch from 33c86c3 to 4ecf735 Compare April 18, 2024 19:24
@bjrara bjrara force-pushed the metric_schema_merge branch from 4ecf735 to 9ee1908 Compare April 19, 2024 22:40
@lisguo
Copy link
Contributor

lisguo commented May 3, 2024

Closed in favor of #1151

@lisguo lisguo closed this May 3, 2024
@bjrara bjrara changed the title [DO NOT MERGE] Update AppSignals metric schema and log group name [DO NOT MERGE] Application Signals GA Tracking May 16, 2024
@bjrara bjrara deleted the metric_schema_merge branch June 26, 2024 23:28
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