Skip to content

Commit 6e4b75b

Browse files
adrielpatoulmemx-psi
authored andcommitted
[receiver/gitproviderreceiver] add repo branch and contrib count metrics (open-telemetry#28885)
**Description:** Second PR for the gitprovider receiver to add functionality for repo, branch, and contributor count metrics. There will have to be more than 4 repos given the amount of metrics collected in this scraper, so we're only adding these 3 to show capability and foundation. open-telemetry#22028 **Testing:** Basic tests included for the functionality. **Documentation:** Documentation updated to include information about configuration of metrics and the metrics that are currently available alongside targets. --------- Co-authored-by: Antoine Toulme <[email protected]> Co-authored-by: Pablo Baeyens <[email protected]>
1 parent ac84d1e commit 6e4b75b

29 files changed

+27953
-337
lines changed

.chloggen/gitprovider-impl-2.yaml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Use this changelog template to create an entry for release notes.
2+
3+
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
4+
change_type: new_component
5+
6+
# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver)
7+
component: gitproviderreceiver
8+
9+
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
10+
note: add repo, branch, and contributor count metrics
11+
12+
# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
13+
issues: [22028]
14+
15+
# (Optional) One or more lines of additional information to render under the primary note.
16+
# These lines will be padded with 2 spaces and then inserted directly into the document.
17+
# Use pipe (|) for multiline entries.
18+
subtext:
19+
20+
# If your change doesn't affect end users or the exported elements of any package,
21+
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label.
22+
# Optional: The change log or logs in which this entry should be included.
23+
# e.g. '[user]' or '[user, api]'
24+
# Include 'user' if the change is relevant to end users.
25+
# Include 'api' if there is a change to a library API.
26+
# Default: '[user]'
27+
change_logs: [user]

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ docker-telemetrygen:
230230
COMPONENT=telemetrygen $(MAKE) docker-component
231231

232232
.PHONY: generate
233-
generate:
233+
generate: install-tools
234234
cd cmd/mdatagen && $(GOCMD) install .
235235
$(MAKE) for-all CMD="$(GOCMD) generate ./..."
236236

internal/tools/go.mod

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/internal/tools
33
go 1.20
44

55
require (
6+
github.com/Khan/genqlient v0.6.0
67
github.com/client9/misspell v0.3.4
78
github.com/daixiang0/gci v0.11.2
89
github.com/golangci/golangci-lint v1.55.1
@@ -36,7 +37,10 @@ require (
3637
github.com/OpenPeeDeeP/depguard/v2 v2.1.0 // indirect
3738
github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371 // indirect
3839
github.com/acomagu/bufpipe v1.0.4 // indirect
40+
github.com/agnivade/levenshtein v1.1.1 // indirect
3941
github.com/alecthomas/go-check-sumtype v0.1.3 // indirect
42+
github.com/alexflint/go-arg v1.4.2 // indirect
43+
github.com/alexflint/go-scalar v1.0.0 // indirect
4044
github.com/alexkohler/nakedret/v2 v2.0.2 // indirect
4145
github.com/alexkohler/prealloc v1.0.0 // indirect
4246
github.com/alingse/asasalint v0.0.11 // indirect
@@ -45,15 +49,15 @@ require (
4549
github.com/beorn7/perks v1.0.1 // indirect
4650
github.com/bkielbasa/cyclop v1.2.1 // indirect
4751
github.com/blizzy78/varnamelen v0.8.0 // indirect
48-
github.com/bmatcuk/doublestar/v4 v4.6.1 // indirect
52+
github.com/bmatcuk/doublestar/v4 v4.0.2 // indirect
4953
github.com/bombsimon/wsl/v3 v3.4.0 // indirect
5054
github.com/breml/bidichk v0.2.7 // indirect
5155
github.com/breml/errchkjson v0.3.6 // indirect
5256
github.com/butuzov/ireturn v0.2.2 // indirect
5357
github.com/butuzov/mirror v1.1.0 // indirect
5458
github.com/catenacyber/perfsprint v0.2.0 // indirect
5559
github.com/ccojocar/zxcvbn-go v1.0.1 // indirect
56-
github.com/cespare/xxhash/v2 v2.2.0 // indirect
60+
github.com/cespare/xxhash/v2 v2.1.2 // indirect
5761
github.com/charithe/durationcheck v0.0.10 // indirect
5862
github.com/chavacava/garif v0.1.0 // indirect
5963
github.com/cloudflare/circl v1.3.3 // indirect
@@ -97,7 +101,7 @@ require (
97101
github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4 // indirect
98102
github.com/google/go-cmp v0.6.0 // indirect
99103
github.com/google/go-github v17.0.0+incompatible // indirect
100-
github.com/google/go-querystring v1.1.0 // indirect
104+
github.com/google/go-querystring v1.0.0 // indirect
101105
github.com/gordonklaus/ineffassign v0.0.0-20230610083614-0e73809eb601 // indirect
102106
github.com/gostaticanalysis/analysisutil v0.7.1 // indirect
103107
github.com/gostaticanalysis/comment v1.4.2 // indirect
@@ -140,7 +144,7 @@ require (
140144
github.com/mattn/go-colorable v0.1.13 // indirect
141145
github.com/mattn/go-isatty v0.0.17 // indirect
142146
github.com/mattn/go-runewidth v0.0.9 // indirect
143-
github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect
147+
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
144148
github.com/mbilski/exhaustivestruct v1.2.0 // indirect
145149
github.com/mgechev/revive v1.3.4 // indirect
146150
github.com/mitchellh/copystructure v1.2.0 // indirect
@@ -157,10 +161,10 @@ require (
157161
github.com/pjbgf/sha1cd v0.3.0 // indirect
158162
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
159163
github.com/polyfloyd/go-errorlint v1.4.5 // indirect
160-
github.com/prometheus/client_golang v1.17.0 // indirect
161-
github.com/prometheus/client_model v0.4.1-0.20230718164431-9a2bf3000d16 // indirect
162-
github.com/prometheus/common v0.45.0 // indirect
163-
github.com/prometheus/procfs v0.12.0 // indirect
164+
github.com/prometheus/client_golang v1.12.1 // indirect
165+
github.com/prometheus/client_model v0.2.0 // indirect
166+
github.com/prometheus/common v0.32.1 // indirect
167+
github.com/prometheus/procfs v0.7.3 // indirect
164168
github.com/quasilyte/go-ruleguard v0.4.0 // indirect
165169
github.com/quasilyte/gogrep v0.5.0 // indirect
166170
github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727 // indirect
@@ -203,6 +207,7 @@ require (
203207
github.com/ultraware/funlen v0.1.0 // indirect
204208
github.com/ultraware/whitespace v0.0.5 // indirect
205209
github.com/uudashr/gocognit v1.1.2 // indirect
210+
github.com/vektah/gqlparser/v2 v2.5.1 // indirect
206211
github.com/xanzy/ssh-agent v0.3.3 // indirect
207212
github.com/xen0n/gosmopolitan v1.2.2 // indirect
208213
github.com/yagipy/maintidx v1.0.0 // indirect
@@ -219,7 +224,7 @@ require (
219224
golang.org/x/exp/typeparams v0.0.0-20230307190834-24139beb5833 // indirect
220225
golang.org/x/mod v0.14.0 // indirect
221226
golang.org/x/net v0.18.0 // indirect
222-
golang.org/x/oauth2 v0.14.0 // indirect
227+
golang.org/x/oauth2 v0.12.0 // indirect
223228
golang.org/x/sync v0.5.0 // indirect
224229
golang.org/x/sys v0.14.0 // indirect
225230
golang.org/x/text v0.14.0 // indirect

0 commit comments

Comments
 (0)