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

addingMetricsSupportInKafkaConnector #39808

Merged
merged 13 commits into from
Apr 24, 2024

Conversation

xinlian12
Copy link
Member

Related to #38765

Design

azure-cosmos has metrics support, and exposed multiple API so that customer can config with metrics category, tags, percentiles etc.

In kafka connector, instead of exposing those capabilities through configs, we allow customers to configure through environment variable/system properties + enable metrics collection by using java agents.

Example with use AppInsights java agent
export KAFKA_OPTS="-javaagent:$base_dir/applicationinsights-agent-3.5.1.jar -DCOSMOS.METRICS_CONFIG={\"metricCategories\":\"[OperationDetails]\"}"

 System.setProperty(
            "COSMOS.METRICS_CONFIG",
           "{\"metricCategories\":\"[OperationSummary, RequestSummary]\","
               + "\"tagNames\":\"[Container, Operation]\","
               + "\"sampleRate\":0.5,"
               + "\"percentiles\":[0.90,0.99],"
               + "\"enableHistograms\":false,"
               + "\"applyDiagnosticThresholdsForTransportLevelMeters\":true}");

image

Copy link
Member

@FabianMeiswinkel FabianMeiswinkel left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@kushagraThapar kushagraThapar left a comment

Choose a reason for hiding this comment

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

Overall looks good to me, thanks @xinlian12

@xinlian12
Copy link
Member Author

/azp run java - cosmos - tests

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@xinlian12
Copy link
Member Author

/azp run java - cosmos - kafka

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@azure-sdk
Copy link
Collaborator

API change check

API changes are not detected in this pull request.

@xinlian12
Copy link
Member Author

/azp run java - cosmos - kafka

@xinlian12
Copy link
Member Author

/azp run java - cosmos - tests

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

1 similar comment
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@xinlian12
Copy link
Member Author

/azp run java - cosmos - kafka

@xinlian12
Copy link
Member Author

/azp run java - cosmos - tests

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

1 similar comment
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@xinlian12
Copy link
Member Author

/azp run java - cosmos - kafka

@xinlian12
Copy link
Member Author

/azp run java - cosmos - tests

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

1 similar comment
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@xinlian12
Copy link
Member Author

/check-enforcer override

@xinlian12 xinlian12 merged commit d17f07b into Azure:main Apr 24, 2024
80 of 84 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants