-
Notifications
You must be signed in to change notification settings - Fork 515
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(mysql): Metrics for mysql #1220
Merged
dyladan
merged 81 commits into
open-telemetry:main
from
haddasbronfman:add-mysql-metrics
Jan 4, 2023
Merged
Changes from 62 commits
Commits
Show all changes
81 commits
Select commit
Hold shift + click to select a range
569d21c
feat(mysql): started working on mysql metrics
haddasbronfman 1b32eb3
Merge branch 'main' into add-mysql-metrics
haddasbronfman 477fa6c
feat(mysql): remove redundant code
haddasbronfman b12de48
Merge branch 'add-mysql-metrics' of github.com:haddasbronfman/opentel…
haddasbronfman c7ce388
feat(mysql): fix lint errors
haddasbronfman 6bb21eb
Merge branch 'main' into add-mysql-metrics
haddasbronfman f41ed40
feat(mysql): try to run only metrics test
haddasbronfman f96fb10
Merge branch 'add-mysql-metrics' of github.com:haddasbronfman/opentel…
haddasbronfman 97ff8f9
feat(mysql): add createConnection
haddasbronfman 7301a11
feat(mysql): metricsTake2
haddasbronfman 8cf707a
feat(mysql): lint
haddasbronfman d2a3233
feat(mysql): metrics take2
haddasbronfman 2ef8241
feat(mysql): rename take2.test.ts test
haddasbronfman 5138cf8
feat(mysql): disable all github actions except lint & unit-test
haddasbronfman 516a1fe
feat(mysql): remove poolCluster. add 1 metrics test
haddasbronfman 181345f
feat(mysql): lint
haddasbronfman bb206c0
feat(mysql): remove parallel option
haddasbronfman 80a2790
Merge branch 'main' into add-mysql-metrics
haddasbronfman 0876d9a
feat(mysql): keep only unit-test action & change test to 4 exportedMe…
haddasbronfman 7419210
Merge branch 'add-mysql-metrics' of github.com:haddasbronfman/opentel…
haddasbronfman bb768cd
feat(mysql): bug fix in metrics test
haddasbronfman 30ac5c4
feat(mysql): bug fix in metrics test - datapoint
haddasbronfman 5e9b4e3
Merge branch 'main' into add-mysql-metrics
haddasbronfman 691df84
feat(mysql): uncomment all github workflows
haddasbronfman ae7e012
Merge branch 'add-mysql-metrics' of github.com:haddasbronfman/opentel…
haddasbronfman 751f89a
feat(mysql): revert changes
haddasbronfman 0e830c1
feat(mysql): lint
haddasbronfman cfe629f
feat(mysql): fix to 2 exportedMetrics
haddasbronfman 545ae3f
Merge branch 'main' into add-mysql-metrics
dyladan 58e8bdc
feat(mysql): fix according to specifications
haddasbronfman 94da4bf
Merge branch 'add-mysql-metrics' of github.com:haddasbronfman/opentel…
haddasbronfman d930017
feat(mysql): fix 'state' field according to specifications
haddasbronfman 3f077a6
feat(mysql): move sdk-metrics to devDependencies
haddasbronfman 06d2e3d
feat(mysql): lint
haddasbronfman 8d168c7
Merge branch 'main' into add-mysql-metrics
haddasbronfman eb7f5a3
Merge branch 'main' into add-mysql-metrics
haddasbronfman 2f86369
feat(metrics): add metrics example & a function to print the current …
haddasbronfman 1e9d446
Merge branch 'main' into add-mysql-metrics
haddasbronfman 6746ccc
feat(metrics): remove the function that prints the current metrics
haddasbronfman dcb1502
Merge branch 'add-mysql-metrics' of github.com:haddasbronfman/opentel…
haddasbronfman e0a5e05
feat(metrics): remove redundant imports
haddasbronfman 729d8ec
Merge branch 'main' into add-mysql-metrics
haddasbronfman 345da4f
Merge branch 'main' into add-mysql-metrics
haddasbronfman 3b5513a
feat(metrics): add example code for 2 connections in the same pool
haddasbronfman aa18802
Merge branch 'add-mysql-metrics' of github.com:haddasbronfman/opentel…
haddasbronfman 3a3edd4
feat(metrics): lint
haddasbronfman dd9b707
feat(metrics): add docker-compose to set up grafana, prometheus, otel…
haddasbronfman 2f397ee
feat(metrics): add readme instructions about the docker compose
haddasbronfman 4c5864c
fix(mysql): add name attribute + examples with 2 pools
haddasbronfman 537c91b
Merge branch 'main' into add-mysql-metrics
haddasbronfman b7a913f
fix(mysql): lint
haddasbronfman fe65af1
Merge branch 'add-mysql-metrics' of github.com:haddasbronfman/opentel…
haddasbronfman 3b07481
fix(mysql): add test for 'name' attribute
haddasbronfman 754af63
fix(mysql): fix 'name' test
haddasbronfman 8c02d3b
fix(mysql): add tests for poolCluster
haddasbronfman 9dfc5c8
fix(mysql): lint
haddasbronfman 5902fed
fix(mysql): lint
haddasbronfman 510da98
fix(mysql): fix tests
haddasbronfman cb17540
Merge branch 'main' into add-mysql-metrics
haddasbronfman 8481d9d
fix(mysql): remove comments
haddasbronfman 403a22d
Merge branch 'add-mysql-metrics' of github.com:haddasbronfman/opentel…
haddasbronfman 29e21c8
fix(mysql): move getPoolName to utils file + add tests
haddasbronfman dc65f35
fix(mysql): fix dependencies
haddasbronfman f5071f2
fix(mysql): add test that uses pool.query
haddasbronfman 19e3075
fix(mysql): lint
haddasbronfman 7058372
fix(mysql): patch pool.end function, add test for 2 connections
haddasbronfman 464c230
Merge branch 'main' into add-mysql-metrics
haddasbronfman 3b78a86
fix(mysql): improve loop
haddasbronfman 6897dcb
Merge branch 'add-mysql-metrics' of github.com:haddasbronfman/opentel…
haddasbronfman f9ce208
Merge branch 'main' into add-mysql-metrics
haddasbronfman 4d5490f
fix(mysql): change pool.anme according to new spec
haddasbronfman 4131d16
Merge branch 'main' into add-mysql-metrics
haddasbronfman 17c4e6a
fix(mysql): lint
haddasbronfman 26fd2ff
fix(mysql): lint
haddasbronfman a02cb89
fix(mysql): fix tests
haddasbronfman 51e6c82
fix(mysql): handle the case where PoolCluster.add is called without id
haddasbronfman 24db720
fix(mysql): remove redundant log
haddasbronfman c60a919
fix(mysql): fix readme
haddasbronfman 5b01dbb
Merge branch 'main' into add-mysql-metrics
haddasbronfman 2ce42ee
fix(mysql): lint
haddasbronfman 529d784
Merge branch 'main' into add-mysql-metrics
haddasbronfman File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
.../opentelemetry-instrumentation-mysql/examples/docker/collector/otel-collector-config.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
receivers: | ||
otlp: | ||
protocols: | ||
grpc: | ||
|
||
exporters: | ||
prometheus: | ||
endpoint: "0.0.0.0:8889" | ||
const_labels: | ||
label1: value1 | ||
|
||
logging: | ||
loglevel: debug | ||
|
||
zipkin: | ||
endpoint: "http://zipkin-all-in-one:9411/api/v2/spans" | ||
format: proto | ||
|
||
jaeger: | ||
endpoint: jaeger-all-in-one:14250 | ||
tls: | ||
insecure: true | ||
|
||
processors: | ||
batch: | ||
|
||
extensions: | ||
health_check: | ||
pprof: | ||
endpoint: :1888 | ||
zpages: | ||
endpoint: :55679 | ||
|
||
service: | ||
extensions: [pprof, zpages, health_check] | ||
pipelines: | ||
traces: | ||
receivers: [otlp] | ||
processors: [batch] | ||
exporters: [logging] | ||
metrics: | ||
receivers: [otlp] | ||
processors: [batch] | ||
exporters: [logging, prometheus] |
68 changes: 68 additions & 0 deletions
68
plugins/node/opentelemetry-instrumentation-mysql/examples/docker/docker-compose.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
version: "2" | ||
services: | ||
|
||
# mysql | ||
mysql: | ||
image: mysql:5.7 | ||
command: --init-file /etc/mysql/init.sql | ||
volumes: | ||
- ./mysql/init.sql:/etc/mysql/init.sql | ||
environment: | ||
- MYSQL_ROOT_PASSWORD=secret | ||
ports: | ||
- "3306:3306" | ||
|
||
# Jaeger | ||
|
||
jaeger-all-in-one: | ||
image: jaegertracing/all-in-one:latest | ||
ports: | ||
- "16686:16686" | ||
- "14268" | ||
- "14250" | ||
|
||
# Zipkin | ||
|
||
zipkin-all-in-one: | ||
image: openzipkin/zipkin:latest | ||
ports: | ||
- "9411:9411" | ||
|
||
# Collector | ||
|
||
otel-collector: | ||
image: otel/opentelemetry-collector-contrib:0.61.0 | ||
command: ["--config=/etc/otel-collector-config.yaml", ""] | ||
volumes: | ||
- ./collector/otel-collector-config.yaml:/etc/otel-collector-config.yaml | ||
ports: | ||
- "1888:1888" # pprof extension | ||
- "8888:8888" # Prometheus metrics exposed by the collector | ||
- "8889:8889" # Prometheus exporter metrics | ||
- "13133:13133" # health_check extension | ||
- "4317:4317" # OTLP gRPC receiver | ||
- "55679:55679" # zpages extension | ||
depends_on: | ||
- jaeger-all-in-one | ||
- zipkin-all-in-one | ||
|
||
# Prometheus | ||
|
||
prometheus: | ||
image: quay.io/prometheus/prometheus:v2.34.0 | ||
command: --config.file=/etc/prometheus/prometheus.yml --no-scrape.adjust-timestamps | ||
volumes: | ||
- ./prometheus/prometheus.yaml:/etc/prometheus/prometheus.yml | ||
ports: | ||
- "9090:9090" | ||
|
||
# Grafana | ||
|
||
grafana: | ||
image: grafana/grafana:9.0.1 | ||
container_name: grafana | ||
volumes: | ||
- ./grafana/grafana.ini:/etc/grafana/grafana.ini | ||
- ./grafana/provisioning/:/etc/grafana/provisioning/ | ||
ports: | ||
- "3000:3000" |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
People may not notice this in the prose when they are using or when they modify the instrumentation. I would just leave it as "trace data and metrics" and link to a list of supported metrics in another heading.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks. I'll fix that.