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

feat(metric): Add prometheus pushgateway support #2415

Merged
merged 1 commit into from
Sep 4, 2023

Conversation

FoghostCn
Copy link
Contributor

@FoghostCn FoghostCn commented Sep 2, 2023

  1. removed metrics configurations:
    • Mode: only supports pull mode before,now use prometheus.exporter.enabled and prometheus.pushgateway.enabled instead, and pull mode is the default behavior if metrics.enable is true
    • Namespace: does not support modification. it is useless now
    • PushGatewayAddress: never supported before. prometheus.pushgateway.* is the new config
  2. removed file:
  3. Add prometheus pushgateway support, we can enabled it by config:
  metrics:
    prometheus:
      pushgateway:
        enabled: true
        base-url: "localhost:9999"
        job: myjob
        username: dubbo
        password: 1234
        push-interval: 10

@sonarqubecloud
Copy link

sonarqubecloud bot commented Sep 2, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@codecov-commenter
Copy link

Codecov Report

Merging #2415 (a640f4c) into main (da40230) will increase coverage by 0.68%.
The diff coverage is 48.57%.

❗ Current head a640f4c differs from pull request most recent head 5df3bc3. Consider uploading reports for the commit 5df3bc3 to get more accurate results

@@            Coverage Diff             @@
##             main    #2415      +/-   ##
==========================================
+ Coverage   44.37%   45.06%   +0.68%     
==========================================
  Files         303      269      -34     
  Lines       18411    18157     -254     
==========================================
+ Hits         8170     8182      +12     
+ Misses       9377     9105     -272     
- Partials      864      870       +6     
Files Changed Coverage Δ
config/metric_config.go 52.17% <0.00%> (-17.60%) ⬇️
metrics/prometheus/registry.go 77.77% <62.96%> (-11.42%) ⬇️

... and 32 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Contributor

@ev1lQuark ev1lQuark left a comment

Choose a reason for hiding this comment

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

Nice work! LGTM.

@chickenlj chickenlj merged commit fb6641d into apache:main Sep 4, 2023
@FoghostCn FoghostCn deleted the push branch September 4, 2023 07:57
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