Skip to content

Commit

Permalink
Prometheus Integration general availability
Browse files Browse the repository at this point in the history
  • Loading branch information
alejandrodnm committed Sep 18, 2019
1 parent 9a148a0 commit f168a4e
Show file tree
Hide file tree
Showing 65 changed files with 22,917 additions and 1 deletion.
13 changes: 13 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
root = true

[*]
indent_style = space
indent_size = 2
tab_width = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.go]
indent_style = tab
12 changes: 12 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
.DS_Store
.idea
*.log
tmp/
vendor/*/
!vendor/github.com/
vendor/github.com/*/
!vendor/github.com/newrelic/
vendor/github.com/newrelic/*/
!vendor/github.com/newrelic/go-telemetry-sdk/
bin/
deploy/local*.yaml
26 changes: 26 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
linters:
enable:
- govet
- golint
- goimports
- unused
- goconst
- errcheck
enable-all: false
disable-all: true
fast: false

# all available settings of specific linters
linters-settings:
golint:
# minimal confidence for issues, default is 0.8
min-confidence: 0.3

issues:
exclude-use-default: false

misspell:
locale: US

lll:
line-length: 100
164 changes: 164 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,164 @@
# Change Log

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## Unreleased

### Added
- Reconnect support when resource watcher connection is dropped.

### Changed
- Fix and refactor self describing metrics
- Fix how the scrape interval is respected.

## 0.10.3
### Added
- Decorate samples with `k8s.cluster.name`.

### Fixed
- Logic for target discovery was adding nodes even when they were not labelled and required a label to be scraped.
- The `SCRAPE_DURATION` time is respected even when the scrape cycle might finish earlier.

## 0.10.2
### Added
- Support for scraping static targets using (mutual) TLS authentication.

### Changed
- By default do not skip the TLS verification.
- Revamp of the static target configuration:
- `endpoints` key renamed to `targets`. If you had endpoints configured before, you need to update your
configuration and restart the scraper.
- Each item in target can contain one or many urls in the `urls` key. This key is always a list.
- Each target hosts its own TLS configuration in the `tls_config` key.
- The TLS configuration contains 3 keys: `ca_file_path`, `cert_file_path` and `key_file_path`
- Rename rules are executed at the end of the transformations pipeline. Now Copy attributes
rules are being executed before it, so the name of metrics being used for matching the source and
the dest match with the original scraped instead of the renamed one.

### Removed
- Static targets cannot be configured via environment variables anymore, as it requires a complex structure now. See
the _Changed_ section for more information.

## 0.10.1
### Fixed
- The Telemetry Emitter now correctly handles counter metrics.

## 0.10.0 - 2019-07-02
### Added
- Integration benchmark
- `scrape_duration` configuration option to specify the length in time to distribute the
scraping from the endpoints.
- Ignore rule accepts now exceptions.

### Changed
- Delta calculator memory optimization
- Avoid growing slices when converting from Prometheus metrics
to our internal DTO by setting the final capacity. This reduces memory allocs.
- Optimized Target Metadata generation
- Distributed targets fetching on time, to avoid memory peaks and big heaps.
- Putting processing rules in contiguous memory to decrease the working set of
the process.
- Emitters are now responsible for any delta calculation.
- The default emitter now is the Go Telemetry SDK.

### Removed
- Unused `RawMetrics` field from `TargetMetrics` data structure.

## 0.9.0 - 2019-06-12
### Added
- Transformation rule to add static attributes, i.e. a cluster name, through the configuration.
- Default attributes to decorate the metrics with: `clusterName`, `integrationVersion` and `integrationName`.
- Mount pprof http endpoints when running in debug mode.
- `targetName` attribute added to the metrics when converting from Prometheus metrics.
- Integration benchmark

### Changed
- Now convert Prometheus metric types to our own types in the fetchers.
- Emitters now receive `Metric`s instead of `Observation`s to avoid coupling with the format of especific emitters.
- Convert Prometheus `counter`s into New Relic `count`s
- Adapter the fetcher to use the worker concurrency pattern instead of starting blocked go routines.

### Removed
- `nrMetricName` and `nrMetricType` aren't added as metric attributes anymore. This is done by the Metric API.
- `metadata` field removed from the `Metric` type.
- `labels` field removed from the `Target` type.
- The parallel emitter has been removed.

### Fixed
- Now listing pods when looking for targets.
- The Kubernetes target retriever now removes targets if their scrape label is removed or not `true` anymore.

## 0.8.2 - 2019-04-17
### Fixed
- StartTimeMs is now generated correctly.

## 0.8.1 - 2019-04-16
### Fixed
- StartTimeMs values are correctly sent as milliseconds.
- Update the Kubernetes retriever to continue watching the objects when there is
an error listing them.

## 0.8.0 - 2019-03-04
### Changed
- Transformations config format
- Internal refactoring

## 0.7.0 - 2019-02-25
### Added
- Add support for reading config options from a configuration file
- Read processing rules from the config file

### Changed
- Rename URL config option and its default value
- Modify docker images to don't use the root user

## 0.6.0 - 2019-02-22
### Changed
- Added more rename attributes for known exporters

## 0.5.0 - 2019-02-22
### Changed
- Prefix metric attributes that are coming from K8s object labels

### Removed
- Removed "entityName" attribute from all the metrics


## 0.4.0 - 2019-02-22
### Added
- Log error when a request to the metric API is not successful
- Support for K8s clusters using RBAC

### Changed
- Rename the attribute with info about the scraped endpoint

## 0.3.0 - 2019-02-20
### Added
- Decorate metrics from K8s targets with K8s context attributes
- Add option to decorate metrics automatically

### Changed
- Ignore unsupported metric type
- Send Prometheus untyped metrics as gauges
- Renamed the integration

## 0.2.0 - 2019-02-20
### Added
- Emitters: "api" and "stdout"
- Configurable list of static endpoints
- Integration metrics

### Changed
- Refactor: Decoupled data processing pipeline
- v0.3.0 metrics format
- Watch Kubernetes objects

### Removed
- New Relic Infrastructure Agent dependency

## 0.1.0 - 2019-02-13
### Added
- Initial version
77 changes: 77 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# CONTRIBUTOR COVENANT CODE OF CONDUCT

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age,
body size, disability, ethnicity, sex characteristics, gender identity and
expression, level of experience, education, socio-economic status, nationality,
personal appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

- The use of sexualized language or imagery and unwelcome sexual attention or
advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others’ private information, such as a physical or electronic
address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies within all project spaces, and it also applies
when an individual is representing the project or its community in public
spaces. Examples of representing a project or community include using an
official project e-mail address, posting via an official social media account,
or acting as an appointed representative at an online or offline event.
Representation of a project may be further defined and clarified by project
maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at [email protected]. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an
incident. Further details of specific enforcement policies may be posted
separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project’s leadership.

## Attribution

This Code of Conduct is adapted from the Contributor Covenant, version 1.4,
available at
https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq
Loading

0 comments on commit f168a4e

Please sign in to comment.