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

Migrate updates to Prometheus receiver from opencensus-service #208

Merged
merged 27 commits into from
Aug 7, 2019
Merged

Migrate updates to Prometheus receiver from opencensus-service #208

merged 27 commits into from
Aug 7, 2019

Conversation

dinooliva
Copy link
Contributor

No description provided.

@codecov-io
Copy link

codecov-io commented Jul 30, 2019

Codecov Report

Merging #208 into master will increase coverage by 0.91%.
The diff coverage is 90.43%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #208      +/-   ##
==========================================
+ Coverage   72.74%   73.65%   +0.91%     
==========================================
  Files         107      112       +5     
  Lines        6108     6560     +452     
==========================================
+ Hits         4443     4832     +389     
- Misses       1438     1484      +46     
- Partials      227      244      +17
Impacted Files Coverage Δ
receiver/opencensusreceiver/factory.go 88.57% <ø> (ø) ⬆️
exporter/exporterhelper/common.go 100% <ø> (ø) ⬆️
...r/addattributesprocessor/addattributesprocessor.go 100% <ø> (ø) ⬆️
processor/tailsampling/metrics.go 0% <ø> (ø)
internal/collector/processor/metrics.go 0% <ø> (ø) ⬆️
receiver/vmmetricsreceiver/metrics_receiver.go 0% <ø> (ø) ⬆️
config/configmodels/configmodels.go 0% <ø> (ø) ⬆️
compression/grpc/grpc.go 100% <ø> (ø)
receiver/prometheusreceiver/internal/metadata.go 0% <ø> (-75%) ⬇️
service/telemetry.go 72.97% <ø> (ø) ⬆️
... and 53 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e87131c...4389c22. Read the comment docs.

Copy link
Member

@songy23 songy23 left a comment

Choose a reason for hiding this comment

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

LGTM

To other reviewers: FYI this is mostly a cherry-pick of census-instrumentation/opencensus-service#597 and census-instrumentation/opencensus-service#613 (already reviewed).

Remove stale content, put in place a simple skeleton, and put information for the Zipkin exporter.
Copy link
Contributor

@ccaraman ccaraman left a comment

Choose a reason for hiding this comment

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

Thank you for updating the documentation!


ScrapeLoop strips out any tag with empty value, however, in OpenCensus, the tag keys is stored separately, we need to able to get all the possible tag keys
of the same metric family before committing the metric family to the sink.

5. StartTimestamp and values of metrics of cumulative types

In OpenCensus, every metrics of cumulative type is required to have a StartTimestamp, which records when a metric is first recorded, however, Prometheus
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: OpenTelemetry instead of OpenCensus. :)

Copy link
Contributor

Choose a reason for hiding this comment

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

Would it be possible to replace all mentions of OpenCensus with OpenTelemetry?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done - also change references to ocagent to otelsvc.

http_requests_total{method="post",code="200"} 1028
http_requests_total{method="post",code="400"} 5
```

Copy link
Contributor

Choose a reason for hiding this comment

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

Separate sentence for how the first scrape is used.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@@ -232,16 +239,27 @@ Counter as described in the [Prometheus Metric Types Document](https://prometheu
> is a cumulative metric that represents a single monotonically increasing counter whose value can only increase or be
> reset to zero on restart

It is one of the most simple metric types we can be found in both systems. Examples of Prometheus Counters is as shown
below:
It is one of the most simple metric types we can find in both systems. However, it is a cumulative type of metric,
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: 'we can find' -> 'found' ie simple metrics types found in both systems.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

It is one of the most simple metric types we can be found in both systems. Examples of Prometheus Counters is as shown
below:
It is one of the most simple metric types we can find in both systems. However, it is a cumulative type of metric,
considering with have two continuous scrapes from a target, with the first one as shown below:
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you reword 'considering with have two continuous scrapes'? It is a bit hard to follow.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@@ -403,12 +441,19 @@ Prometheus. We have to set this value to `0` instead.

### Gaugehistogram

This is an undocumented data type, it shall be same as regular [Histogram](#histogram)
This is an undocumented data type, and it's not supported currently
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: full stop at the end of the sentence.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

provided in Prometheus, and `nil` will be used for these values.

Other than that, in some prometheus implementations, such as the Python version, Summary is allowed to have no quantiles, in a case
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: full stop at the end of the sentence.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

jpkrohling and others added 7 commits July 31, 2019 09:52
* Added Jaeger gRPC receiver

Signed-off-by: Juraci Paixão Kröhling <[email protected]>

* Addressed first review round

Signed-off-by: Juraci Paixão Kröhling <[email protected]>

* Changes based on the feedback from the second review

Signed-off-by: Juraci Paixão Kröhling <[email protected]>

* Fixed import order, check for same ip:port on endpoints

Signed-off-by: Juraci Paixão Kröhling <[email protected]>

* Reverted the port-check

Signed-off-by: Juraci Paixão Kröhling <[email protected]>
Refactored oc exporter code to make it easier to import in derived
builds without copying all the code.

Example derived exporter: https://github.com/owais/example-derived-oc-exporter

- Moved internal/compression to root
- Split opencensusexporter factory's `CreateTraceExporter` method into
  - `OCAgentOptions` and `CreateOCAgent`
MD5 is insecure cryptographic hash functions, and are therefore unsuitable for security applications.
* Add goimports check and fix import order for all files

Updates #155.

* Try specifying a version for goimports

* Show the diff instead of files and fix import

* Fix default in Makefile
* Add factory and update config for tail sampling processor

Updates #146

* Move to package processor

* Remove an unnecessary check

* Move CreateDefaultConfig to factory and add unit tests

* Fix test failure

* Remove commented code
* Add misspell check and fix all typos

Updates #155.

* Format

* Include yaml files
Copy link
Contributor

@pjanotti pjanotti left a comment

Choose a reason for hiding this comment

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

I read the text but very little of the code, I know that there were already a detailed code review on OCSvc repo. Just for sanity I will finish a quick pass tomorrow.

go.mod Outdated Show resolved Hide resolved
receiver/prometheusreceiver/README.md Outdated Show resolved Hide resolved
receiver/prometheusreceiver/README.md Outdated Show resolved Hide resolved
receiver/prometheusreceiver/README.md Outdated Show resolved Hide resolved
receiver/prometheusreceiver/README.md Outdated Show resolved Hide resolved
receiver/prometheusreceiver/internal/metricfamily.go Outdated Show resolved Hide resolved
Copy link
Member

@songy23 songy23 left a comment

Choose a reason for hiding this comment

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

Please rebase and resolve the merge conflicts.

songy23 and others added 9 commits August 1, 2019 11:06
* Add Observability Vision document

This is a guidance document that developers can consult with when
working on improving own observability of OpenTelemetry Service.

* PR fixes
* Add Zipkin exporter factory

Add the Zipkin exporter configuration factory using the new configuration format. This does not bring many of the settings from the old configuration since they won't be used. In a sub-sequent PR the code of the exporter itself will be changed.

* PR Feedback: add 1 test plus some comments

* Rename endpoint to http-url and related field

* Fix goimports issue

* Remove TODO commented code

Replaced the TODO commented code with an issue.

* Rename the field used to specify destination
* First round of receiver and opencensus receiver documentation.

* Undo go mod/sum changes

* Address initial set of comments.

* Address next set of comments.

* Address next set of comments.

* Fix use of server instead of receiver in comment and explain settings can be mix and matched.

* Merged master and fixed mispell error caugh with new tools
* Add static check

Fixes #155.

* Fix most staticcheck errors

* More fixes

* Fix id_batcher
The paramater was named exportFormat but it actually used as the exporter name.
* Add Jaeger gRPC exporter

Adds a Jaeger gRPC exporter.

* Update exporters/README.md

* Fixes on the exporter/README.md

* Add doc.go with package description.

* Fix import order on config_test.go
Copy link
Contributor

@pjanotti pjanotti left a comment

Choose a reason for hiding this comment

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

Hit @dinooliva - I did a quick pass and seems good, could you please rebase so we can be sure that all is well?

@dinooliva
Copy link
Contributor Author

Thanks @pjanotti - I've rebased and fixed issues from the new static checks, should be good to go.

Copy link
Contributor

@pjanotti pjanotti left a comment

Choose a reason for hiding this comment

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

LGTM.

@dinooliva
Copy link
Contributor Author

Thanks! When do you think this can be merged?

@pjanotti pjanotti merged commit 22b9a57 into open-telemetry:master Aug 7, 2019
@pjanotti
Copy link
Contributor

pjanotti commented Aug 7, 2019

Merged it is, thanks @dinooliva.

@dinooliva dinooliva deleted the prometheus-receiver-migration branch August 7, 2019 23:00
hughesjj pushed a commit to hughesjj/opentelemetry-collector that referenced this pull request Apr 27, 2023
* Add Linux support bundle script

- Ensure executable
- Update troubleshooting guide with support case details
- Move upstream troubleshooting from README.md to troubleshooting.md
- Add tests to existing installer_test

* Attempt to fix execution bit

* Address feedback

* Update docs/troubleshooting.md

Co-authored-by: Ryan Fitzpatrick <[email protected]>

* Update docs/troubleshooting.md

Co-authored-by: Ryan Fitzpatrick <[email protected]>

* Update docs/troubleshooting.md

Co-authored-by: Ryan Fitzpatrick <[email protected]>
Troels51 pushed a commit to Troels51/opentelemetry-collector that referenced this pull request Jul 5, 2024
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.

9 participants