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

[FLINK-30284][flink-metrics] Adding datacenter url property to datadog #25592

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rstpv
Copy link

@rstpv rstpv commented Oct 30, 2024

What is the purpose of the change

This change deprecates the dataCenter configuration for DataDog reporter and replaces it with dataCenterUrl that allows users to configure whole address of the data center to use.

Brief change log

  • Deprecates dataCenter key from DataDog reporter configuration (logs a warning to the users).
  • Add new configuration option dataCenterUrl that accepts full address of Data Dog site, it defaults to US data center.

Verifying this change

Please make sure both new and modified tests in this PR follow the conventions for tests defined in our code quality guide.

This change is already covered by existing tests, such as DatadogHttpClientTest

Does this pull request potentially affect one of the following parts:

  • Dependencies (does it add or upgrade a dependency): no
  • The public API, i.e., is any changed class annotated with @Public(Evolving): no
  • The serializers: (yes / no / don't know): no
  • The runtime per-record code paths (performance sensitive): (yes / no / don't know): no
  • Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: (yes / no / don't know): no
  • The S3 file system connector: (yes / no / don't know): no

Documentation

  • Does this pull request introduce a new feature? (yes / no): yes
  • If yes, how is the feature documented? docs

* Deprecating dataCenter for a more configurable dataCenterUrl property
@flinkbot
Copy link
Collaborator

flinkbot commented Oct 30, 2024

CI report:

Bot commands The @flinkbot bot supports the following commands:
  • @flinkbot run azure re-run the last Azure build

this.configTags = getTagsFromConfig(tags);

LOGGER.info(
"Configured DatadogHttpReporter with {tags={}, proxyHost={}, proxyPort={}, dataCenter={}, maxMetricsPerRequest={}",
"Configured DatadogHttpReporter with {tags={}, proxyHost={}, proxyPort={}, dataCenterUrl={}, maxMetricsPerRequest={}",
Copy link
Contributor

Choose a reason for hiding this comment

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

I was thinking you would keep the original constructor and deprecate it and add a new constructor for the url.
The log here would then come out reflecting the users config.

I see you have refactored the callers to send through the url. deprecating might be cleaner. WDYT ?

The methods should all have @publicEvolving @internal tags as appropriate in all the methods in all the classes

@@ -257,7 +257,8 @@ Parameters:
- `apikey` - the Datadog API key
- `proxyHost` - (optional) The proxy host to use when sending to Datadog.
- `proxyPort` - (optional) The proxy port to use when sending to Datadog, defaults to 8080.
- `dataCenter` - (optional) The data center (`EU`/`US`) to connect to, defaults to `US`.
- `dataCenter` - (deprecated/optional) The data center (`EU`/`US`) to connect to, defaults to `US`. *DEPRECATED* will be removed in a future flink version, please use `dataCenterUrl`.
- `dataCenterUrl`- (optional) The datacenter url to connect to, defaults to `https://app.datadoghq.com`.
Copy link
Contributor

Choose a reason for hiding this comment

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

I suggest removing the deprecated option from the example below.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants