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: Add prometheus exporter #483

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
06d2ebb
fix(http-plugin): move node-sdk to dev deps
danielkhan Sep 28, 2019
5eed5be
Merge remote-tracking branch 'upstream/master'
danielkhan Sep 28, 2019
c1da699
Merge remote-tracking branch 'upstream/master'
danielkhan Oct 2, 2019
8c64c2e
Merge remote-tracking branch 'upstream/master'
danielkhan Oct 3, 2019
3a9c4e1
Merge remote-tracking branch 'upstream/master'
danielkhan Oct 3, 2019
c79aca6
Merge remote-tracking branch 'upstream/master'
danielkhan Oct 8, 2019
39afafa
Merge remote-tracking branch 'upstream/master'
danielkhan Oct 16, 2019
c9ca19b
Merge remote-tracking branch 'upstream/master'
danielkhan Oct 18, 2019
e70342c
feat: update dependencies
danielkhan Oct 18, 2019
79110e7
Merge remote-tracking branch 'upstream/master'
danielkhan Oct 19, 2019
d720531
chore: version bumps
danielkhan Oct 19, 2019
5e99e8d
feat: server implementation and tests
danielkhan Oct 20, 2019
2659298
fix: remove console logger
danielkhan Oct 24, 2019
2dd51d9
fix: add types
danielkhan Oct 29, 2019
b26f810
feat(prometheus-exporter): counter and gauge
dyladan Oct 30, 2019
bd51f05
Merge remote-tracking branch 'upstream/master' into add-prometheus-ex…
dyladan Oct 30, 2019
b5c7758
feat(prometheus-exporter): implement counter and gauge
dyladan Nov 4, 2019
f313cbd
feat(prometheus-exporter): export configuration interface
dyladan Nov 4, 2019
fa1d017
fix: linting
dyladan Nov 4, 2019
ed9b530
Merge remote-tracking branch 'upstream/master' into add-prometheus-ex…
dyladan Nov 4, 2019
bc62167
fix: typo
dyladan Nov 4, 2019
39d53a5
chore: document ExporterConfig
dyladan Nov 4, 2019
9248b23
fix: dependencies
dyladan Nov 4, 2019
11c2a39
Merge branch 'add-prometheus-exporter-dan' of github.com:dynatrace-os…
dyladan Nov 4, 2019
ba9c1fe
fix: typo
dyladan Nov 5, 2019
07c648f
chore: document sanitize method and make behavior more strict
dyladan Nov 5, 2019
4b8b2f0
Merge branch 'add-prometheus-exporter-dan' of github.com:dynatrace-os…
dyladan Nov 5, 2019
c60bc21
chore: do not use global prom-client registry
dyladan Nov 5, 2019
a67dc36
chore: add defaults to description and metric endpoint
dyladan Nov 5, 2019
14ac445
test: export couter, gauge, multiple, and none
dyladan Nov 5, 2019
9720452
test: sanitize prom metric names
dyladan Nov 5, 2019
b082c17
Merge remote-tracking branch 'upstream/master' into add-prometheus-ex…
dyladan Nov 5, 2019
c3e5e90
fix: typo
dyladan Nov 5, 2019
9d9dd45
chore: make _server read only
dyladan Nov 5, 2019
1f824cf
test: add tests for prom export configuration
dyladan Nov 5, 2019
ccd5ce4
style: make comments descriptive
dyladan Nov 5, 2019
686c7a3
Merge branch 'add-prometheus-exporter-dan' of github.com:dynatrace-os…
dyladan Nov 5, 2019
1e52448
Merge remote-tracking branch 'upstream/master' into add-prometheus-ex…
dyladan Nov 6, 2019
3ba915f
Merge remote-tracking branch 'upstream/master' into add-prometheus-ex…
dyladan Nov 8, 2019
129023e
test: update tests for label sets
dyladan Nov 8, 2019
b2735b2
Merge branch 'master' into add-prometheus-exporter-dan
mayurkale22 Nov 11, 2019
20efbba
fix: lint
dyladan Nov 11, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions packages/opentelemetry-exporter-prometheus/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "@opentelemetry/exporter-prometheus",
"version": "0.2.0",
"private": true,
"description": "OpenTelemetry Exporter Prometheus provides a metrics endpoint for Prometheus",
"main": "build/src/index.js",
"types": "build/src/index.d.ts",
Expand Down Expand Up @@ -43,16 +42,20 @@
"@types/node": "^12.6.9",
"codecov": "^3.5.0",
"gts": "^1.1.0",
"mocha": "^6.2.0",
"mocha": "^6.2.2",
"nyc": "^14.1.1",
"rimraf": "^3.0.0",
"ts-mocha": "^6.0.0",
"ts-node": "^8.3.0",
"tslint-consistent-codestyle": "^1.16.0",
"tslint-microsoft-contrib": "^6.2.0",
"typescript": "3.7.2"
},
"dependencies": {
"@opentelemetry/base": "^0.2.0",
"@opentelemetry/core": "^0.2.0",
"@opentelemetry/types": "^0.2.0"
"@opentelemetry/metrics": "^0.2.0",
"@opentelemetry/types": "^0.2.0",
"prom-client": "^11.5.3"
}
}
dyladan marked this conversation as resolved.
Show resolved Hide resolved
53 changes: 53 additions & 0 deletions packages/opentelemetry-exporter-prometheus/src/export/types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
/*!
mayurkale22 marked this conversation as resolved.
Show resolved Hide resolved
* Copyright 2019, OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

import * as types from '@opentelemetry/types';

/**
* Configuration interface for prometheus exporter
*/
export interface ExporterConfig {
dyladan marked this conversation as resolved.
Show resolved Hide resolved
/**
* App prefix for metrics, if needed
*
* @default ''
* */
prefix?: string;
dyladan marked this conversation as resolved.
Show resolved Hide resolved

/**
* Endpoint the metrics should be exposed at with preceeding slash
* @default '/metrics'
*/
endpoint?: string;

/**
* Port number for Prometheus exporter server
*
* Default registered port is 9464:
* https://github.com/prometheus/prometheus/wiki/Default-port-allocations
* @default 9464
*/
port?: number;

/**
* Define if the Prometheus exporter server will be started
* @default false
*/
startServer?: boolean;

/** Standard logging interface */
logger?: types.Logger;
}
3 changes: 2 additions & 1 deletion packages/opentelemetry-exporter-prometheus/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@
* limitations under the License.
*/

//
export * from './prometheus';
export * from './export/types';
Loading