├── .gitignore ├── CODEOWNERS ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── SECURITY.md ├── SUPPORT.md ├── builder-config.yml ├── components.go ├── components_test.go ├── go.mod ├── go.sum ├── installers ├── linux │ ├── Makefile │ ├── control │ ├── deb-scripts │ │ ├── postinst │ │ └── prerm │ ├── sample-trace2-otel-collector.service │ └── scripts │ │ ├── service_start │ │ └── service_stop ├── macos │ ├── Makefile │ ├── com.git-ecosystem.sample-trace2-otel-collector.plist │ ├── distribution.amd64.xml │ ├── distribution.arm64.xml │ ├── postinstall │ ├── preinstall │ ├── service_start │ ├── service_stop │ └── uninstaller.sh ├── windows_bash │ ├── Makefile │ ├── install.sh │ ├── register.sh │ └── unregister.sh └── windows_batch_file │ ├── build.bat │ ├── install.bat_template │ ├── register.bat_template │ └── unregister.bat_template ├── main.go ├── main_others.go ├── main_windows.go └── sample-configs ├── unix └── config.yml └── windows └── config.yml /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | *~ 3 | /.vscode 4 | 5 | # Ignore the executables that are built in the source directories. 6 | sample-trace2-otel-collector 7 | sample-trace2-otel-collector.exe 8 | 9 | # Ignore the various installer intermediate images. 10 | _out_/ 11 | _layout_/ 12 | _component_/ 13 | _package_/ 14 | -------------------------------------------------------------------------------- /CODEOWNERS: -------------------------------------------------------------------------------- 1 | # This repository is maintained by: 2 | * @dscho @mjcheetham @mpysson 3 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | In the interest of fostering an open and welcoming environment, we as 6 | contributors and maintainers pledge to making participation in our project and 7 | our community a harassment-free experience for everyone, regardless of age, body 8 | size, disability, ethnicity, gender identity and expression, level of experience, 9 | nationality, personal appearance, race, religion, or sexual identity and 10 | orientation. 11 | 12 | ## Our Standards 13 | 14 | Examples of behavior that contributes to creating a positive environment 15 | include: 16 | 17 | * Using welcoming and inclusive language 18 | * Being respectful of differing viewpoints and experiences 19 | * Gracefully accepting constructive criticism 20 | * Focusing on what is best for the community 21 | * Showing empathy towards other community members 22 | 23 | Examples of unacceptable behavior by participants include: 24 | 25 | * The use of sexualized language or imagery and unwelcome sexual attention or 26 | advances 27 | * Trolling, insulting/derogatory comments, and personal or political attacks 28 | * Public or private harassment 29 | * Publishing others' private information, such as a physical or electronic 30 | address, without explicit permission 31 | * Other conduct which could reasonably be considered inappropriate in a 32 | professional setting 33 | 34 | ## Our Responsibilities 35 | 36 | Project maintainers are responsible for clarifying the standards of acceptable 37 | behavior and are expected to take appropriate and fair corrective action in 38 | response to any instances of unacceptable behavior. 39 | 40 | Project maintainers have the right and responsibility to remove, edit, or 41 | reject comments, commits, code, wiki edits, issues, and other contributions 42 | that are not aligned to this Code of Conduct, or to ban temporarily or 43 | permanently any contributor for other behaviors that they deem inappropriate, 44 | threatening, offensive, or harmful. 45 | 46 | ## Scope 47 | 48 | This Code of Conduct applies both within project spaces and in public spaces 49 | when an individual is representing the project or its community. Examples of 50 | representing a project or community include using an official project e-mail 51 | address, posting via an official social media account, or acting as an appointed 52 | representative at an online or offline event. Representation of a project may be 53 | further defined and clarified by project maintainers. 54 | 55 | ## Enforcement 56 | 57 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 58 | reported by contacting the project team at opensource@github.com. All 59 | complaints will be reviewed and investigated and will result in a response that 60 | is deemed necessary and appropriate to the circumstances. The project team is 61 | obligated to maintain confidentiality with regard to the reporter of an incident. 62 | Further details of specific enforcement policies may be posted separately. 63 | 64 | Project maintainers who do not follow or enforce the Code of Conduct in good 65 | faith may face temporary or permanent repercussions as determined by other 66 | members of the project's leadership. 67 | 68 | ## Attribution 69 | 70 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, 71 | available at [http://contributor-covenant.org/version/1/4][version] 72 | 73 | [homepage]: http://contributor-covenant.org 74 | [version]: http://contributor-covenant.org/version/1/4/ 75 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | ## Contributing 2 | 3 | 4 | Hi there! We're thrilled that you'd like to contribute to this 5 | project. Your help is essential for keeping it great. 6 | 7 | Contributions to this project are 8 | [released](https://help.github.com/articles/github-terms-of-service/#6-contributions-under-repository-license) 9 | to the public under the 10 | [project's open source license](./LICENSE). 11 | 12 | Please note that this project is released with a 13 | [Contributor Code of Conduct](./CODE_OF_CONDUCT.md). 14 | By participating in this project you agree to abide by its terms. 15 | 16 | 17 | ## Prerequisites for running and testing code 18 | 19 | These are one time installations required to be able to test your 20 | changes locally as part of the pull request (PR) submission process. 21 | 22 | 1. Install Go [through download](https://go.dev/doc/install) | [through Homebrew](https://formulae.brew.sh/formula/go) 23 | 1. Clone this repository. 24 | 1. Build and test your changes in isolation. 25 | 1. Submit your PR. 26 | 27 | Note that the custom collector source is all generated using the 28 | OpenTelemetry collector builder tool, so we don't expect you to 29 | modify the generated source. We will regenerate that source from 30 | time to time as the OpenTelemetry project updates their tool 31 | and when dependent modules are updated. 32 | 33 | We welcome PRs that do that accelerate keeping the sample 34 | collector up to date. 35 | 36 | And, of course, we welcome PRs on the non-generated portions 37 | of the code. This includes the sample installers and useful 38 | collector configurations. 39 | 40 | 41 | ## Submitting a pull request 42 | 43 | 1. Clone the repository 44 | 1. Make your changes and test, test, test. 45 | 1. Make sure the collector tests pass on your machine: `go test -v ./...` 46 | 1. Make sure the installer scripts work on your machine. 47 | 1. Create a new branch: `git checkout -b my-branch-name` 48 | 1. Push to your fork and submit a pull request. 49 | 1. Pat yourself on the back and wait for your pull request to be reviewed and merged. 50 | 51 | Here are a few things you can do that will increase the likelihood of 52 | your pull request being accepted: 53 | 54 | - Write tests. 55 | - Keep your change as focused as possible. If there are multiple changes you would like to make that are not dependent upon each other, consider submitting them as separate pull requests. 56 | - Write a [good commit message](https://github.blog/2022-06-30-write-better-commits-build-better-projects/). 57 | 58 | 59 | ## Resources 60 | 61 | - [How to Contribute to Open Source](https://opensource.guide/how-to-contribute/) 62 | - [Using Pull Requests](https://help.github.com/articles/about-pull-requests/) 63 | - [GitHub Help](https://help.github.com) 64 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright GitHub 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Sample Trace2 OpenTelemetry Collector 2 | 3 | This directory contains a sample custom collector to read 4 | Trace2 telemetry from Git commands, transform it into OTLP, 5 | and export it to various OpenTelemetry data sinks. 6 | 7 | You can use this demonstration collector to quickly evaluate the 8 | [`trace2receiver`](https://github.com/git-ecosystem/trace2receiver) 9 | technology and before building your own telemetry solution. 10 | 11 | The collector source code (`./*.go` and `./go.*`) distributed 12 | in this repository was generated automatically by the OpenTelemetry 13 | builder tool (as explained below). Its purpose is to quick start 14 | your evaluation. 15 | 16 | * NOTE Once you become familiar with the technology, 17 | you'll want to fork the repo, download the most recent version 18 | of the builder tool, and regenerate the source code. This is 19 | especially true if you want to include other exporter components 20 | that I didn't include in the demonstration version. 21 | 22 | Also included in this repository is a set of Makefiles and scripts 23 | to build distribution/installer packages for the collector on each 24 | of the major platforms. The collector is designed to run as a 25 | long-running service daemon and these scripts will help you 26 | start building your own packages. These scripts cover the basic 27 | setup, but omit some details, like package signing. 28 | 29 | * NOTE Before generating deployment packages, you'll want to: 30 | * Configure your `config.yml` (as explained below) to talk to your chosen telemetry data sink or cloud provider. 31 | * Create any additional `pii.yml`, `filter.yml`, and rulesets so that your distribution packages will be pre-configured when you deploy them to your users. 32 | * Rename the example collector exectuable, pathnames, and assets to reflect your organization. 33 | 34 | 35 | 36 | ## Generating/regenerating the sample collector 37 | 38 | The GOLANG source was generated using the OpenTelemetry 39 | [builder](https://github.com/open-telemetry/opentelemetry-collector/tree/main/cmd/builder) 40 | tool and the `builder-config.yml` definition. This YML file 41 | defines the various receiver, pipeline, and exporter components 42 | that will be statically linked into the custom collector executable. 43 | If you want to add or remove a component, update the YML file 44 | and re-run the builder tool. 45 | 46 | You should update the component versions listed in this YML file 47 | before running the builder tool, since the builder tool will generate 48 | the `go.mod` file and you don't want it to start with obsolete 49 | dependencies. 50 | 51 | ``` 52 | $ GO111MODULE=on go install go.opentelemetry.io/collector/cmd/builder@latest 53 | $ ~/go/bin/builder --config ./builder-config.yml 54 | $ go build 55 | $ go test 56 | ``` 57 | 58 | The `builder-config.yml` file provided here contains a basic set of components to get you started. 59 | The [`trace2receiver`](https://github.com/git-ecosystem/trace2receiver) component 60 | has additional [details](https://github.com/git-ecosystem/trace2receiver/blob/main/Docs/). 61 | 62 | The `go` commands will automatically pull in the `trace2receiver` 63 | component as a dependent module in the normal GOLANG way. You may 64 | want to update the version numbers of any dependent modules at this time. 65 | 66 | 67 | 68 | ### Errors 69 | 70 | If you see a warning like the following, update all of the pinned component versions in the `builder-config.yml` file to match the suggested version (by the newer version of the builder tool) and try again. 71 | 72 | ``` 73 | % ~/go/bin/builder --config ./builder-config.yml 74 | 2023-11-16T12:30:23.932-0500 INFO internal/command.go:123 OpenTelemetry Collector Builder {"version": "dev", "date": "unknown"} 75 | 2023-11-16T12:30:23.934-0500 INFO internal/command.go:159 Using config file {"path": "./builder-config.yml"} 76 | 2023-11-16T12:30:23.934-0500 INFO builder/config.go:109 Using go {"go-executable": "/usr/local/go/bin/go"} 77 | 2023-11-16T12:30:23.934-0500 INFO builder/main.go:67 You're building a distribution with non-aligned version of the builder. Compilation may fail due to API changes. Please upgrade your builder or API {"builder-version": "0.89.0"} 78 | 2023-11-16T12:30:23.937-0500 INFO builder/main.go:91 Sources created {"path": "."} 79 | ... 80 | ``` 81 | 82 | In my case, I last used `v0.81.0` in my `builder-config.yml` file and upgraded the tool to `v0.89.0`, so I had a mismatch. 83 | 84 | ``` 85 | % git diff -- builder-config.yml 86 | diff --git a/builder-config.yml b/builder-config.yml 87 | index b011468..3b1e23e 100644 88 | --- a/builder-config.yml 89 | +++ b/builder-config.yml 90 | @@ -2,21 +2,21 @@ dist: 91 | module: github.com/git-ecosystem/sample-trace2-otel-collector 92 | name: sample-trace2-otel-collector 93 | description: Custom OTEL Collector to convert and relay Git Trace2 data to OTLP 94 | - otelcol_version: 0.81.0 95 | + otelcol_version: 0.89.0 96 | output_path: . 97 | version: 0.0.0 98 | 99 | exporters: 100 | - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/azuremonitorexporter v0.81.0 101 | + - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/azuremonitorexporter v0.89.0 102 | - import: go.opentelemetry.io/collector/exporter/loggingexporter 103 | - gomod: go.opentelemetry.io/collector v0.81.0 104 | + gomod: go.opentelemetry.io/collector v0.89.0 105 | - import: go.opentelemetry.io/collector/exporter/otlpexporter 106 | - gomod: go.opentelemetry.io/collector v0.81.0 107 | + gomod: go.opentelemetry.io/collector v0.89.0 108 | 109 | receivers: 110 | - gomod: github.com/git-ecosystem/trace2receiver v0.4.3 111 | 112 | processors: 113 | - import: go.opentelemetry.io/collector/processor/batchprocessor 114 | - gomod: go.opentelemetry.io/collector v0.81.0 115 | + gomod: go.opentelemetry.io/collector v0.89.0 116 | ``` 117 | 118 | 119 | 120 | ## Configuring the sample collector 121 | 122 | Once built, your collector requires another YML file to tell it which (of the 123 | statically linked components) to actually instantiate, how to plumb data 124 | between them, and set any configuration parameters (such as cloud credentials 125 | for your data sink(s) or other pathnames). 126 | 127 | The `sample-configs/*/config.yml` files provided here contains a minimal set of components to log 128 | telemetry to the console or system event viewer. They assume that: 129 | * On Linux and macOS: you will install the collector executable and 130 | the various YML files into `/usr/local/sample-trace2-otel-collector/`. 131 | * On Windows: you will install the executable into `C:/Program Files/sample-trace2-otel-collector/` and 132 | the various YML data files into `C:/ProgramData/sample-trace2-otel-collector/`. 133 | 134 | _(The named pipe pathname is not in the ProgramData directory, since 135 | named pipes must be created on the Named Pipe File System (NPFS) and 136 | have the `//./pipe/` prefix.)_ 137 | 138 | The `trace2receiver` component has additional 139 | [details](https://github.com/git-ecosystem/trace2receiver/blob/main/Docs/configure-custom-collector.md) 140 | and several [examples](https://github.com/git-ecosystem/trace2receiver/tree/main/Docs/Examples). 141 | 142 | 143 | 144 | ## Interactively running the sample collector (optional) 145 | 146 | If you want, you can run the collector in a terminal window to test 147 | your configuration. When interactive, the debug log will appear on the 148 | console. You can change the two logging verbosity settings in the `config.yml` 149 | file to see the OTLP being emitted. 150 | 151 | ``` 152 | $ ./sample-trace2-otel-collector --config 153 | ``` 154 | 155 | _In addition to having a running the collector, listening on a Unix 156 | Domain Socket (SOCKET) or Windows Named Pipe (PIPE), you'll also need 157 | to tell Git to send telemetry to the collector using the 158 | `trace2.eventtarget` Git config variable (using `--system` or 159 | `--global` scope). The various installer `service_start` scripts show 160 | how to do this._ 161 | 162 | 163 | 164 | 165 | ## Building sample installer packages 166 | 167 | The provided `installer//Makefile` will build a minimal installer 168 | package for your platform. 169 | 170 | ### On macOS 171 | 172 | To build an installer PKG on macOS: 173 | 174 | ``` 175 | $ go build 176 | $ cd ./installer/ 177 | $ make layout 178 | $ make package 179 | ``` 180 | 181 | A ".pkg" will be created in `./installer/macos/_out_/_pkg_/`. You can use it to 182 | install the sample collector in `/usr/local/sample-trace2-otel-collector/*`. 183 | The installer script will copy the files, register it with `launchctl(1)`, 184 | and start it. 185 | 186 | The scripts in `/usr/local/sample-trace2-otel-collector/scripts/*` let you 187 | stop and restart the service. Use these if you want to try different settings 188 | in your installed `config.yml` or other YML files (such as `filter.yml`). 189 | 190 | The `/usr/local/sample-trace2-otel-collector/uninstaller.sh` script will stop 191 | the service and delete it. 192 | 193 | 194 | ### On Linux 195 | 196 | To build an installer DEB on Linux: 197 | 198 | ``` 199 | $ go build 200 | $ cd ./installer/ 201 | $ make layout 202 | $ make package 203 | ``` 204 | 205 | A ".deb" will be created in `./installer/linux/_out_/_pkg_/`. You can use it to 206 | install the sample collector in `/usr/local/sample-trace2-otel-collector/*`. 207 | The installer script will copy the files, register it with `systemctl(1)`, 208 | and start it. 209 | 210 | The scripts in `/usr/local/sample-trace2-otel-collector/scripts/*` let you 211 | stop and restart the service. Use these if you want to try different settings 212 | in your installed `config.yml` or other YML files (such as `filter.yml`). 213 | 214 | 215 | ### On Windows (Command Prompt) 216 | 217 | To build a ZIP file for Windows using a Command Prompt and create BAT files. 218 | (_You can use either a VS Developer Command Prompt or a plain Command Prompt._) 219 | 220 | ``` 221 | > go build 222 | > cd ./installer/windows_batch_file 223 | > build.bat 224 | ``` 225 | 226 | A ZIP file will be created in `./installer/windows_batch_file/_out_/` containing the 227 | executable, the YML files, and scripts to install and register/unregister 228 | the service with Control Panel. You can redistribute the ZIP file and let 229 | users (in an elevated Command Prompt) run the `install.bat` and `register.bat` 230 | scripts. You should then see the collector in the Control Panel Service Manager. 231 | 232 | Having three scripts is not as nice as a stand-alone exe installer, 233 | but they will let you kick the tires and/or distribute the ZIP file to your users 234 | without involving a third-party installer-builder tool. 235 | 236 | 237 | NOTE: The `register.bat` script will use `git config --global` to set some global 238 | config values to tell Git to send telemetry data to the collector. These are 239 | per-user config values, so telemetry will only be collected from the user who 240 | ran the script. If you want to collect telemetry from multiple users on a 241 | computer, you should have each user execute those Git commands. This is a 242 | limitation of using "global" scope. You might change it to use `--system` 243 | scope, but this causes problems if you have multiple versions of Git installed 244 | on the computer, such as the one bundled with Visual Studio vs the one installed 245 | in `C:\Program Files\Git`, since each version has its own notion of where 246 | the system configuration is stored. Using `--global` solves that problem. 247 | 248 | 249 | 250 | ### On Windows (Git SDK) (Deprecated) 251 | 252 | If you have the Git SDK installer and are comfortable in an `msys2 bash` shell, 253 | you can create a ZIP file for Windows that uses bash scripts: 254 | 255 | ``` 256 | $ go build 257 | $ cd ./installer/windows_bash 258 | $ make layout 259 | $ make package 260 | ``` 261 | 262 | A ZIP file will be created in `./installers/windows_bash/_out_/` containing the 263 | executable, the YML files, and scripts to install and register/unregister 264 | the service with Control Panel. The ZIP file will contain `install.sh`, 265 | `register.sh` and `unregister.sh`. Run these from an elevated bash terminal. 266 | You should then see the collector in the Control Panel Service Manager. 267 | 268 | _I created these scripts during development, but very few people have the Git 269 | SDK installed, so I created the above BAT file versions and will retire the 270 | bash version eventually._ 271 | 272 | 273 | ## Troubleshooting 274 | 275 | ### Use the console logs 276 | 277 | Once you have the collector running as a service, you can look at 278 | its console logs in `/usr/local/sample-trace2-otel-collector/logs/*` 279 | on Linux and macOS. On Windows, these messages are written to the 280 | Event Viewer (under "Windows Logs > Application"). 281 | 282 | * NOTE I would rather that console logs on Windows were written to a 283 | log file in the ProgramData directory rather than the Event Viewer, but 284 | that is the behavior of the default logger built into the collector. 285 | It should be possible to change this, but I have not taken time to 286 | investigate this. 287 | 288 | There are two settings in `config.yml` to control the verbosity of 289 | the console logs. You can turn them up to get more detailed messages 290 | and debug output. _(They will generate a lot of data, so don't forget 291 | to turn them back down when you're finished.)_ 292 | 293 | 294 | ### Add a real exporter 295 | 296 | In the example `config.yml` that I included with this sample collector, 297 | it only writes to the console log. You'll need to add one or more (real) 298 | exporters to send the telemetry somewhere. The documentation in the 299 | `trace2receiver` component has several examples. 300 | 301 | 302 | ### Verify the rendezvous SOCKET or PIPE 303 | 304 | The Trace2 feature in Git will send telemetry to a SOCKET or PIPE 305 | defined in the `trace2.eventtarget` system- or global-level config 306 | value. The value of this pathname must match the pathname where the 307 | collector is listening. 308 | 309 | The Git config variable is added to the Git environment using the 310 | various `service_start` or `register.sh` scripts in the installers. 311 | 312 | The collector gets this pathname from the `config.yml` file. 313 | 314 | If you're not seeing any data for your Git commands, verify that these 315 | two pathnames match. It may be helpful to use `GIT_TRACE2_DST_DEBUG` 316 | to verify that Git can write to the SOCKET or PIPE: 317 | 318 | ``` 319 | $ git config --global trace2.eventtarget "af_unix:/foo" 320 | $ GIT_TRACE2_DST_DEBUG=1 git version 321 | warning: trace2: could not connect to socket '/foo' for 'GIT_TRACE2_EVENT' tracing: No such file or directory 322 | git version 2.42.0 323 | ``` 324 | 325 | 326 | ### Too much data 327 | 328 | If you're sending too much telemetry to your data sink or 329 | cloud provider, you can try the filtering built into the 330 | `trace2receiver` component. For example, have it drop data 331 | from uninteresting commands or repositories and let you focus 332 | on the important commands that are causing your users pain. 333 | 334 | The `trace2receiver` documentation has a whole section on 335 | such filtering. 336 | 337 | You may also want to consider adding a pipeline component 338 | (between the trace2 receiver component and your exporter 339 | component) that does some form of sampling. That is outside 340 | of the scope of my goals here. 341 | 342 | 343 | 344 | ## Contributions 345 | 346 | This project is under active development, and loves contributions from 347 | the community. Check out the [CONTRIBUTING](./CONTRIBUTING.md) guide 348 | for details on getting started. 349 | 350 | 351 | ## License 352 | 353 | This project is licensed under the terms of the MIT open source license. 354 | Please refer to [LICENSE](./LICENSE) for the full terms. 355 | 356 | 357 | ## Maintainers 358 | 359 | See [CODEOWNERS](./CODEOWNERS) for a list of current project maintainers. 360 | 361 | 362 | ## Support 363 | 364 | See [SUPPORT](./SUPPORT.md) for instructions on how to file bugs, make feature 365 | requests, or seek help. 366 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | Thanks for helping make GitHub safe for everyone. 2 | 3 | # Security 4 | 5 | GitHub takes the security of our software products and services seriously, including all of the open source code repositories managed through our GitHub organizations, such as [GitHub](https://github.com/GitHub). 6 | 7 | Even though [open source repositories are outside of the scope of our bug bounty program](https://bounty.github.com/index.html#scope) and therefore not eligible for bounty rewards, we will ensure that your finding gets passed along to the appropriate maintainers for remediation. 8 | 9 | ## Reporting Security Issues 10 | 11 | If you believe you have found a security vulnerability in any GitHub-owned repository, please report it to us through coordinated disclosure. 12 | 13 | **Please do not report security vulnerabilities through public GitHub issues, discussions, or pull requests.** 14 | 15 | Instead, please send an email to opensource-security[@]github.com. 16 | 17 | Please include as much of the information listed below as you can to help us better understand and resolve the issue: 18 | 19 | * The type of issue (e.g., buffer overflow, SQL injection, or cross-site scripting) 20 | * Full paths of source file(s) related to the manifestation of the issue 21 | * The location of the affected source code (tag/branch/commit or direct URL) 22 | * Any special configuration required to reproduce the issue 23 | * Step-by-step instructions to reproduce the issue 24 | * Proof-of-concept or exploit code (if possible) 25 | * Impact of the issue, including how an attacker might exploit the issue 26 | 27 | This information will help us triage your report more quickly. 28 | 29 | ## Policy 30 | 31 | See [GitHub's Safe Harbor Policy](https://docs.github.com/en/github/site-policy/github-bug-bounty-program-legal-safe-harbor#1-safe-harbor-terms) 32 | -------------------------------------------------------------------------------- /SUPPORT.md: -------------------------------------------------------------------------------- 1 | # Support 2 | 3 | ## How to file issues and get help 4 | 5 | This project uses GitHub issues to track bugs and feature requests. Please search the existing issues before filing new issues to avoid duplicates. For new issues, file your bug or feature request as a new issue. 6 | 7 | For help or questions about using this project, please create an issue or start a discussion. 8 | 9 | - `sample-trace2-otel-collector` is under active development and maintained by GitHub staff **AND THE COMMUNITY**. We will do our best to respond to support, feature requests, and community questions in a timely manner. 10 | 11 | ## GitHub Support Policy 12 | 13 | Support for this project is limited to the resources listed above. 14 | -------------------------------------------------------------------------------- /builder-config.yml: -------------------------------------------------------------------------------- 1 | dist: 2 | module: github.com/git-ecosystem/sample-trace2-otel-collector 3 | name: sample-trace2-otel-collector 4 | description: Custom OTEL Collector to convert and relay Git Trace2 data to OTLP 5 | otelcol_version: 0.96.0 6 | output_path: . 7 | version: 0.0.0 8 | 9 | exporters: 10 | - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/azuremonitorexporter v0.96.0 11 | - import: go.opentelemetry.io/collector/exporter/loggingexporter 12 | gomod: go.opentelemetry.io/collector v0.96.0 13 | - import: go.opentelemetry.io/collector/exporter/otlpexporter 14 | gomod: go.opentelemetry.io/collector v0.96.0 15 | 16 | receivers: 17 | - gomod: github.com/git-ecosystem/trace2receiver v0.5.5 18 | 19 | processors: 20 | - import: go.opentelemetry.io/collector/processor/batchprocessor 21 | gomod: go.opentelemetry.io/collector v0.96.0 22 | 23 | -------------------------------------------------------------------------------- /components.go: -------------------------------------------------------------------------------- 1 | // Code generated by "go.opentelemetry.io/collector/cmd/builder". DO NOT EDIT. 2 | 3 | package main 4 | 5 | import ( 6 | "go.opentelemetry.io/collector/connector" 7 | "go.opentelemetry.io/collector/exporter" 8 | "go.opentelemetry.io/collector/extension" 9 | "go.opentelemetry.io/collector/otelcol" 10 | "go.opentelemetry.io/collector/processor" 11 | "go.opentelemetry.io/collector/receiver" 12 | azuremonitorexporter "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/azuremonitorexporter" 13 | loggingexporter "go.opentelemetry.io/collector/exporter/loggingexporter" 14 | otlpexporter "go.opentelemetry.io/collector/exporter/otlpexporter" 15 | batchprocessor "go.opentelemetry.io/collector/processor/batchprocessor" 16 | trace2receiver "github.com/git-ecosystem/trace2receiver" 17 | ) 18 | 19 | func components() (otelcol.Factories, error) { 20 | var err error 21 | factories := otelcol.Factories{} 22 | 23 | factories.Extensions, err = extension.MakeFactoryMap( 24 | ) 25 | if err != nil { 26 | return otelcol.Factories{}, err 27 | } 28 | 29 | factories.Receivers, err = receiver.MakeFactoryMap( 30 | trace2receiver.NewFactory(), 31 | ) 32 | if err != nil { 33 | return otelcol.Factories{}, err 34 | } 35 | 36 | factories.Exporters, err = exporter.MakeFactoryMap( 37 | azuremonitorexporter.NewFactory(), 38 | loggingexporter.NewFactory(), 39 | otlpexporter.NewFactory(), 40 | ) 41 | if err != nil { 42 | return otelcol.Factories{}, err 43 | } 44 | 45 | factories.Processors, err = processor.MakeFactoryMap( 46 | batchprocessor.NewFactory(), 47 | ) 48 | if err != nil { 49 | return otelcol.Factories{}, err 50 | } 51 | 52 | factories.Connectors, err = connector.MakeFactoryMap( 53 | ) 54 | if err != nil { 55 | return otelcol.Factories{}, err 56 | } 57 | 58 | return factories, nil 59 | } 60 | -------------------------------------------------------------------------------- /components_test.go: -------------------------------------------------------------------------------- 1 | // Code generated by "go.opentelemetry.io/collector/cmd/builder". DO NOT EDIT. 2 | 3 | package main 4 | 5 | import ( 6 | "testing" 7 | "github.com/stretchr/testify/assert" 8 | "go.opentelemetry.io/collector/component/componenttest" 9 | ) 10 | 11 | func TestValidateConfigs(t *testing.T) { 12 | factories, err := components() 13 | assert.NoError(t, err) 14 | 15 | for k, factory := range factories.Receivers { 16 | assert.Equal(t, k, factory.Type()) 17 | assert.NoError(t, componenttest.CheckConfigStruct(factory.CreateDefaultConfig())) 18 | } 19 | 20 | for k, factory := range factories.Processors { 21 | assert.Equal(t, k, factory.Type()) 22 | assert.NoError(t, componenttest.CheckConfigStruct(factory.CreateDefaultConfig())) 23 | } 24 | 25 | for k, factory := range factories.Exporters { 26 | assert.Equal(t, k, factory.Type()) 27 | assert.NoError(t, componenttest.CheckConfigStruct(factory.CreateDefaultConfig())) 28 | } 29 | 30 | for k, factory := range factories.Connectors { 31 | assert.Equal(t, k, factory.Type()) 32 | assert.NoError(t, componenttest.CheckConfigStruct(factory.CreateDefaultConfig())) 33 | } 34 | 35 | for k, factory := range factories.Extensions { 36 | assert.Equal(t, k, factory.Type()) 37 | assert.NoError(t, componenttest.CheckConfigStruct(factory.CreateDefaultConfig())) 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /go.mod: -------------------------------------------------------------------------------- 1 | // Code generated by "go.opentelemetry.io/collector/cmd/builder". DO NOT EDIT. 2 | 3 | module github.com/git-ecosystem/sample-trace2-otel-collector 4 | 5 | go 1.22.0 6 | 7 | toolchain go1.23.1 8 | 9 | require ( 10 | github.com/git-ecosystem/trace2receiver v0.5.6 11 | github.com/open-telemetry/opentelemetry-collector-contrib/exporter/azuremonitorexporter v0.111.0 12 | github.com/stretchr/testify v1.9.0 13 | go.opentelemetry.io/collector/component v0.111.0 14 | go.opentelemetry.io/collector/connector v0.111.0 15 | go.opentelemetry.io/collector/exporter v0.111.0 16 | go.opentelemetry.io/collector/exporter/loggingexporter v0.110.0 17 | go.opentelemetry.io/collector/exporter/otlpexporter v0.111.0 18 | go.opentelemetry.io/collector/extension v0.111.0 19 | go.opentelemetry.io/collector/otelcol v0.111.0 20 | go.opentelemetry.io/collector/processor v0.111.0 21 | go.opentelemetry.io/collector/processor/batchprocessor v0.111.0 22 | go.opentelemetry.io/collector/receiver v0.111.0 23 | golang.org/x/sys v0.29.0 24 | ) 25 | 26 | require ( 27 | code.cloudfoundry.org/clock v1.15.0 // indirect 28 | github.com/beorn7/perks v1.0.1 // indirect 29 | github.com/cenkalti/backoff/v4 v4.3.0 // indirect 30 | github.com/cespare/xxhash/v2 v2.3.0 // indirect 31 | github.com/davecgh/go-spew v1.1.1 // indirect 32 | github.com/ebitengine/purego v0.8.0 // indirect 33 | github.com/fsnotify/fsnotify v1.7.0 // indirect 34 | github.com/go-logr/logr v1.4.2 // indirect 35 | github.com/go-logr/stdr v1.2.2 // indirect 36 | github.com/go-ole/go-ole v1.3.0 // indirect 37 | github.com/go-viper/mapstructure/v2 v2.2.1 // indirect 38 | github.com/gofrs/uuid v4.4.0+incompatible // indirect 39 | github.com/gogo/protobuf v1.3.2 // indirect 40 | github.com/golang/snappy v0.0.4 // indirect 41 | github.com/google/uuid v1.6.0 // indirect 42 | github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0 // indirect 43 | github.com/hashicorp/go-version v1.7.0 // indirect 44 | github.com/inconshreveable/mousetrap v1.1.0 // indirect 45 | github.com/json-iterator/go v1.1.12 // indirect 46 | github.com/klauspost/compress v1.17.10 // indirect 47 | github.com/knadh/koanf/maps v0.1.1 // indirect 48 | github.com/knadh/koanf/providers/confmap v0.1.0 // indirect 49 | github.com/knadh/koanf/v2 v2.1.1 // indirect 50 | github.com/lufia/plan9stats v0.0.0-20240909124753-873cd0166683 // indirect 51 | github.com/microsoft/ApplicationInsights-Go v0.4.4 // indirect 52 | github.com/mitchellh/copystructure v1.2.0 // indirect 53 | github.com/mitchellh/mapstructure v1.5.1-0.20231216201459-8508981c8b6c // indirect 54 | github.com/mitchellh/reflectwalk v1.0.2 // indirect 55 | github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect 56 | github.com/modern-go/reflect2 v1.0.2 // indirect 57 | github.com/mostynb/go-grpc-compression v1.2.3 // indirect 58 | github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect 59 | github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.111.0 // indirect 60 | github.com/pmezard/go-difflib v1.0.0 // indirect 61 | github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 // indirect 62 | github.com/prometheus/client_golang v1.20.4 // indirect 63 | github.com/prometheus/client_model v0.6.1 // indirect 64 | github.com/prometheus/common v0.60.0 // indirect 65 | github.com/prometheus/procfs v0.15.1 // indirect 66 | github.com/shirou/gopsutil/v4 v4.24.9 // indirect 67 | github.com/spf13/cobra v1.8.1 // indirect 68 | github.com/spf13/pflag v1.0.5 // indirect 69 | github.com/stretchr/objx v0.5.2 // indirect 70 | github.com/tklauser/go-sysconf v0.3.14 // indirect 71 | github.com/tklauser/numcpus v0.9.0 // indirect 72 | github.com/yusufpapurcu/wmi v1.2.4 // indirect 73 | go.opentelemetry.io/collector v0.111.0 // indirect 74 | go.opentelemetry.io/collector/client v1.17.0 // indirect 75 | go.opentelemetry.io/collector/component/componentprofiles v0.111.0 // indirect 76 | go.opentelemetry.io/collector/component/componentstatus v0.111.0 // indirect 77 | go.opentelemetry.io/collector/config/configauth v0.111.0 // indirect 78 | go.opentelemetry.io/collector/config/configcompression v1.17.0 // indirect 79 | go.opentelemetry.io/collector/config/configgrpc v0.111.0 // indirect 80 | go.opentelemetry.io/collector/config/confignet v1.17.0 // indirect 81 | go.opentelemetry.io/collector/config/configopaque v1.17.0 // indirect 82 | go.opentelemetry.io/collector/config/configretry v1.17.0 // indirect 83 | go.opentelemetry.io/collector/config/configtelemetry v0.111.0 // indirect 84 | go.opentelemetry.io/collector/config/configtls v1.17.0 // indirect 85 | go.opentelemetry.io/collector/config/internal v0.111.0 // indirect 86 | go.opentelemetry.io/collector/confmap v1.17.0 // indirect 87 | go.opentelemetry.io/collector/connector/connectorprofiles v0.111.0 // indirect 88 | go.opentelemetry.io/collector/consumer v0.111.0 // indirect 89 | go.opentelemetry.io/collector/consumer/consumerprofiles v0.111.0 // indirect 90 | go.opentelemetry.io/collector/consumer/consumertest v0.111.0 // indirect 91 | go.opentelemetry.io/collector/exporter/exporterprofiles v0.111.0 // indirect 92 | go.opentelemetry.io/collector/extension/auth v0.111.0 // indirect 93 | go.opentelemetry.io/collector/extension/experimental/storage v0.111.0 // indirect 94 | go.opentelemetry.io/collector/extension/extensioncapabilities v0.111.0 // indirect 95 | go.opentelemetry.io/collector/featuregate v1.17.0 // indirect 96 | go.opentelemetry.io/collector/internal/globalgates v0.111.0 // indirect 97 | go.opentelemetry.io/collector/internal/globalsignal v0.111.0 // indirect 98 | go.opentelemetry.io/collector/pdata v1.17.0 // indirect 99 | go.opentelemetry.io/collector/pdata/pprofile v0.111.0 // indirect 100 | go.opentelemetry.io/collector/pdata/testdata v0.111.0 // indirect 101 | go.opentelemetry.io/collector/pipeline v0.111.0 // indirect 102 | go.opentelemetry.io/collector/processor/processorprofiles v0.111.0 // indirect 103 | go.opentelemetry.io/collector/receiver/receiverprofiles v0.111.0 // indirect 104 | go.opentelemetry.io/collector/semconv v0.111.0 // indirect 105 | go.opentelemetry.io/collector/service v0.111.0 // indirect 106 | go.opentelemetry.io/contrib/config v0.10.0 // indirect 107 | go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.55.0 // indirect 108 | go.opentelemetry.io/contrib/propagators/b3 v1.30.0 // indirect 109 | go.opentelemetry.io/otel v1.30.0 // indirect 110 | go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.6.0 // indirect 111 | go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.30.0 // indirect 112 | go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.30.0 // indirect 113 | go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.30.0 // indirect 114 | go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.30.0 // indirect 115 | go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.30.0 // indirect 116 | go.opentelemetry.io/otel/exporters/prometheus v0.52.0 // indirect 117 | go.opentelemetry.io/otel/exporters/stdout/stdoutlog v0.6.0 // indirect 118 | go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.30.0 // indirect 119 | go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.30.0 // indirect 120 | go.opentelemetry.io/otel/log v0.6.0 // indirect 121 | go.opentelemetry.io/otel/metric v1.30.0 // indirect 122 | go.opentelemetry.io/otel/sdk v1.30.0 // indirect 123 | go.opentelemetry.io/otel/sdk/log v0.6.0 // indirect 124 | go.opentelemetry.io/otel/sdk/metric v1.30.0 // indirect 125 | go.opentelemetry.io/otel/trace v1.30.0 // indirect 126 | go.opentelemetry.io/proto/otlp v1.3.1 // indirect 127 | go.uber.org/multierr v1.11.0 // indirect 128 | go.uber.org/zap v1.27.0 // indirect 129 | golang.org/x/exp v0.0.0-20241004190924-225e2abe05e6 // indirect 130 | golang.org/x/net v0.34.0 // indirect 131 | golang.org/x/text v0.21.0 // indirect 132 | gonum.org/v1/gonum v0.15.1 // indirect 133 | google.golang.org/genproto/googleapis/api v0.0.0-20241007155032-5fefd90f89a9 // indirect 134 | google.golang.org/genproto/googleapis/rpc v0.0.0-20241007155032-5fefd90f89a9 // indirect 135 | google.golang.org/grpc v1.67.1 // indirect 136 | google.golang.org/protobuf v1.35.1 // indirect 137 | gopkg.in/yaml.v2 v2.4.0 // indirect 138 | gopkg.in/yaml.v3 v3.0.1 // indirect 139 | ) 140 | -------------------------------------------------------------------------------- /go.sum: -------------------------------------------------------------------------------- 1 | code.cloudfoundry.org/clock v0.0.0-20180518195852-02e53af36e6c/go.mod h1:QD9Lzhd/ux6eNQVUDVRJX/RKTigpewimNYBi7ivZKY8= 2 | code.cloudfoundry.org/clock v1.15.0 h1:d1jE0akCbESP4OO4I19/1VXOqgYNOJiGyxE37DqWH/8= 3 | code.cloudfoundry.org/clock v1.15.0/go.mod h1:0imaEbpkuzBkviBo38UUJnKuHCQvAQwiaDkmGu3H5hw= 4 | github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= 5 | github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= 6 | github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= 7 | github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= 8 | github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= 9 | github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 10 | github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= 11 | github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 12 | github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= 13 | github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 14 | github.com/ebitengine/purego v0.8.0 h1:JbqvnEzRvPpxhCJzJJ2y0RbiZ8nyjccVUrSM3q+GvvE= 15 | github.com/ebitengine/purego v0.8.0/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLAI0mRfJZTmQ= 16 | github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= 17 | github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= 18 | github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= 19 | github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= 20 | github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= 21 | github.com/git-ecosystem/trace2receiver v0.5.6 h1:VNw52Yz3MOme8XiVUB3qEfpVaY/4pXhAg16a/XHwXCY= 22 | github.com/git-ecosystem/trace2receiver v0.5.6/go.mod h1:BJ19FEufiDbmNPU95ID/myckWnUXf/VHbRhQ/OthPLU= 23 | github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= 24 | github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= 25 | github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= 26 | github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= 27 | github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= 28 | github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= 29 | github.com/go-ole/go-ole v1.3.0 h1:Dt6ye7+vXGIKZ7Xtk4s6/xVdGDQynvom7xCFEdWr6uE= 30 | github.com/go-ole/go-ole v1.3.0/go.mod h1:5LS6F96DhAwUc7C+1HLexzMXY1xGRSryjyPPKW6zv78= 31 | github.com/go-viper/mapstructure/v2 v2.2.1 h1:ZAaOCxANMuZx5RCeg0mBdEZk7DZasvvZIxtHqx8aGss= 32 | github.com/go-viper/mapstructure/v2 v2.2.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= 33 | github.com/gofrs/uuid v3.3.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= 34 | github.com/gofrs/uuid v4.4.0+incompatible h1:3qXRTX8/NbyulANqlc0lchS1gqAVxRgsuW1YrTJupqA= 35 | github.com/gofrs/uuid v4.4.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= 36 | github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= 37 | github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= 38 | github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= 39 | github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= 40 | github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= 41 | github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= 42 | github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= 43 | github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= 44 | github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= 45 | github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= 46 | github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0 h1:asbCHRVmodnJTuQ3qamDwqVOIjwqUPTYmYuemVOx+Ys= 47 | github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0/go.mod h1:ggCgvZ2r7uOoQjOyu2Y1NhHmEPPzzuhWgcza5M1Ji1I= 48 | github.com/hashicorp/go-version v1.7.0 h1:5tqGy27NaOTB8yJKUZELlFAS/LTKJkrmONwQKeRZfjY= 49 | github.com/hashicorp/go-version v1.7.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= 50 | github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= 51 | github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= 52 | github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= 53 | github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= 54 | github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= 55 | github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= 56 | github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= 57 | github.com/klauspost/compress v1.17.10 h1:oXAz+Vh0PMUvJczoi+flxpnBEPxoER1IaAnU/NMPtT0= 58 | github.com/klauspost/compress v1.17.10/go.mod h1:pMDklpSncoRMuLFrf1W9Ss9KT+0rH90U12bZKk7uwG0= 59 | github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NIs= 60 | github.com/knadh/koanf/maps v0.1.1/go.mod h1:npD/QZY3V6ghQDdcQzl1W4ICNVTkohC8E73eI2xW4yI= 61 | github.com/knadh/koanf/providers/confmap v0.1.0 h1:gOkxhHkemwG4LezxxN8DMOFopOPghxRVp7JbIvdvqzU= 62 | github.com/knadh/koanf/providers/confmap v0.1.0/go.mod h1:2uLhxQzJnyHKfxG927awZC7+fyHFdQkd697K4MdLnIU= 63 | github.com/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= 64 | github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= 65 | github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= 66 | github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= 67 | github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= 68 | github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= 69 | github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= 70 | github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= 71 | github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 72 | github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= 73 | github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= 74 | github.com/lufia/plan9stats v0.0.0-20240909124753-873cd0166683 h1:7UMa6KCCMjZEMDtTVdcGu0B1GmmC7QJKiCCjyTAWQy0= 75 | github.com/lufia/plan9stats v0.0.0-20240909124753-873cd0166683/go.mod h1:ilwx/Dta8jXAgpFYFvSWEMwxmbWXyiUHkd5FwyKhb5k= 76 | github.com/microsoft/ApplicationInsights-Go v0.4.4 h1:G4+H9WNs6ygSCe6sUyxRc2U81TI5Es90b2t/MwX5KqY= 77 | github.com/microsoft/ApplicationInsights-Go v0.4.4/go.mod h1:fKRUseBqkw6bDiXTs3ESTiU/4YTIHsQS4W3fP2ieF4U= 78 | github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= 79 | github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= 80 | github.com/mitchellh/mapstructure v1.5.1-0.20231216201459-8508981c8b6c h1:cqn374mizHuIWj+OSJCajGr/phAmuMug9qIX3l9CflE= 81 | github.com/mitchellh/mapstructure v1.5.1-0.20231216201459-8508981c8b6c/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= 82 | github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= 83 | github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= 84 | github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= 85 | github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= 86 | github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= 87 | github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= 88 | github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= 89 | github.com/mostynb/go-grpc-compression v1.2.3 h1:42/BKWMy0KEJGSdWvzqIyOZ95YcR9mLPqKctH7Uo//I= 90 | github.com/mostynb/go-grpc-compression v1.2.3/go.mod h1:AghIxF3P57umzqM9yz795+y1Vjs47Km/Y2FE6ouQ7Lg= 91 | github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= 92 | github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= 93 | github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= 94 | github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= 95 | github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= 96 | github.com/open-telemetry/opentelemetry-collector-contrib/exporter/azuremonitorexporter v0.111.0 h1:pIypPU7AoKho9192HXgsxJ2E64en/BOt7oMGW4/0xIo= 97 | github.com/open-telemetry/opentelemetry-collector-contrib/exporter/azuremonitorexporter v0.111.0/go.mod h1:kc2kyVnp2svBabp22kZGNQQkczFU5DK0MIkIUchN428= 98 | github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.111.0 h1:Hh3Lt6GIw/jMfCSJ5XjBoZRmjZ1pbJJu6Xi7WrDTUi0= 99 | github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.111.0/go.mod h1:rQ9lQhijXIJIT5UGuwiKoEcWW6bdWJ4fnO+PndfuYEw= 100 | github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= 101 | github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= 102 | github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 h1:o4JXh1EVt9k/+g42oCprj/FisM4qX9L3sZB3upGN2ZU= 103 | github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= 104 | github.com/prometheus/client_golang v1.20.4 h1:Tgh3Yr67PaOv/uTqloMsCEdeuFTatm5zIq5+qNN23vI= 105 | github.com/prometheus/client_golang v1.20.4/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE= 106 | github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= 107 | github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= 108 | github.com/prometheus/common v0.60.0 h1:+V9PAREWNvJMAuJ1x1BaWl9dewMW4YrHZQbx0sJNllA= 109 | github.com/prometheus/common v0.60.0/go.mod h1:h0LYf1R1deLSKtD4Vdg8gy4RuOvENW2J/h19V5NADQw= 110 | github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= 111 | github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= 112 | github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= 113 | github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= 114 | github.com/rs/cors v1.11.1 h1:eU3gRzXLRK57F5rKMGMZURNdIG4EoAmX8k94r9wXWHA= 115 | github.com/rs/cors v1.11.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= 116 | github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= 117 | github.com/shirou/gopsutil/v4 v4.24.9 h1:KIV+/HaHD5ka5f570RZq+2SaeFsb/pq+fp2DGNWYoOI= 118 | github.com/shirou/gopsutil/v4 v4.24.9/go.mod h1:3fkaHNeYsUFCGZ8+9vZVWtbyM1k2eRnlL+bWO8Bxa/Q= 119 | github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM= 120 | github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y= 121 | github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= 122 | github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= 123 | github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= 124 | github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= 125 | github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= 126 | github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= 127 | github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= 128 | github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= 129 | github.com/tedsuo/ifrit v0.0.0-20180802180643-bea94bb476cc/go.mod h1:eyZnKCc955uh98WQvzOm0dgAeLnf2O0Rz0LPoC5ze+0= 130 | github.com/tklauser/go-sysconf v0.3.14 h1:g5vzr9iPFFz24v2KZXs/pvpvh8/V9Fw6vQK5ZZb78yU= 131 | github.com/tklauser/go-sysconf v0.3.14/go.mod h1:1ym4lWMLUOhuBOPGtRcJm7tEGX4SCYNEEEtghGG/8uY= 132 | github.com/tklauser/numcpus v0.9.0 h1:lmyCHtANi8aRUgkckBgoDk1nHCux3n2cgkJLXdQGPDo= 133 | github.com/tklauser/numcpus v0.9.0/go.mod h1:SN6Nq1O3VychhC1npsWostA+oW+VOQTxZrS604NSRyI= 134 | github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= 135 | github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= 136 | github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= 137 | github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= 138 | go.opentelemetry.io/collector v0.111.0 h1:D3LJTYrrK2ac94E2PXPSbVkArqxbklbCLsE4MAJQdRo= 139 | go.opentelemetry.io/collector v0.111.0/go.mod h1:eZi4Z1DmHy+sVqbUI8dZNvhrH7HZIlX+0AKorOtv6nE= 140 | go.opentelemetry.io/collector/client v1.17.0 h1:eJB4r4nPY0WrQ6IQEEbOPCOfQU7N15yzZud9y5fKfms= 141 | go.opentelemetry.io/collector/client v1.17.0/go.mod h1:egG3tOG68zvC04hgl6cW2H/oWCUCCdDWtL4WpbcSUys= 142 | go.opentelemetry.io/collector/component v0.111.0 h1:AiDIrhkq6sbHnU9Rhq6t4DC4Gal43bryd1+NTJNojAQ= 143 | go.opentelemetry.io/collector/component v0.111.0/go.mod h1:wYwbRuhzK5bm5x1bX+ukm1tT50QXYLs4MKwzyfiVGoE= 144 | go.opentelemetry.io/collector/component/componentprofiles v0.111.0 h1:yT3Sa833G9GMiXkAOuYi30afd/5vTmDQpZo6+X/XjXM= 145 | go.opentelemetry.io/collector/component/componentprofiles v0.111.0/go.mod h1:v9cm6ndumcbCSqZDBs0vRReRW7KSYax1RZVhs/CiZCo= 146 | go.opentelemetry.io/collector/component/componentstatus v0.111.0 h1:DojO8TbkysTtEoxzN6fJqhgCsu0QhxgJ9R+1bitnowM= 147 | go.opentelemetry.io/collector/component/componentstatus v0.111.0/go.mod h1:wKozN6s9dykUB9aLSBXSPT9SJ2fckNvGSFZx4fRZbSY= 148 | go.opentelemetry.io/collector/config/configauth v0.111.0 h1:0CcgX4TzK5iu2YtryIu3al8lNI+9fqjbGoyvAFk9ZCw= 149 | go.opentelemetry.io/collector/config/configauth v0.111.0/go.mod h1:5oyYNL3gnYMYNdNsEjFvA2Tdc1yjG8L+HQFIjPo6kK8= 150 | go.opentelemetry.io/collector/config/configcompression v1.17.0 h1:5CzLHTPOgHaKod1ZQLYs0o7GZDBhdsLQRm8Lcbo79vU= 151 | go.opentelemetry.io/collector/config/configcompression v1.17.0/go.mod h1:pnxkFCLUZLKWzYJvfSwZnPrnm0twX14CYj2ADth5xiU= 152 | go.opentelemetry.io/collector/config/configgrpc v0.111.0 h1:XwHBWCP0m/d6YZ0VZltzVvnz5hDB9ik7sPRjJIdmjUk= 153 | go.opentelemetry.io/collector/config/configgrpc v0.111.0/go.mod h1:K9OLwZM8dGNL1Jul/FGxlRsnLd1umgDyA+yxq2BNXUs= 154 | go.opentelemetry.io/collector/config/confighttp v0.111.0 h1:nZJFHKYYeCasyhhFC71iZf6GAs6pfFcNOga6b8+lFvc= 155 | go.opentelemetry.io/collector/config/confighttp v0.111.0/go.mod h1:heE5JjcLDiH8fMULf55QL2oI9+8Ct58Vq/QfP7TV684= 156 | go.opentelemetry.io/collector/config/confignet v1.17.0 h1:cBmDdiPuIVrHiecgCKyXhRYmDOz9Do5IM7O1JhbB3es= 157 | go.opentelemetry.io/collector/config/confignet v1.17.0/go.mod h1:o3v4joAEjvLwntqexg5ixMqRrU1+Vst+jWuCUaBNgOg= 158 | go.opentelemetry.io/collector/config/configopaque v1.17.0 h1:wHhUgJhmDgNd6M7GW8IU5HjWi/pNmBEe9jBhavoR45g= 159 | go.opentelemetry.io/collector/config/configopaque v1.17.0/go.mod h1:6zlLIyOoRpJJ+0bEKrlZOZon3rOp5Jrz9fMdR4twOS4= 160 | go.opentelemetry.io/collector/config/configretry v1.17.0 h1:9GaiNKgUDx5by+A0aHKojw1BilHSK+8wq2LOmnynN00= 161 | go.opentelemetry.io/collector/config/configretry v1.17.0/go.mod h1:KvQF5cfphq1rQm1dKR4eLDNQYw6iI2fY72NMZVa+0N0= 162 | go.opentelemetry.io/collector/config/configtelemetry v0.111.0 h1:Q3TJRM2A3FIDjIvzWa3uFArsdFN0I/0GzcWynHjC+oY= 163 | go.opentelemetry.io/collector/config/configtelemetry v0.111.0/go.mod h1:R0MBUxjSMVMIhljuDHWIygzzJWQyZHXXWIgQNxcFwhc= 164 | go.opentelemetry.io/collector/config/configtls v1.17.0 h1:5DPgmBgpKEopLGmkjaihZHVA/8yH0LGoOrUZlb86T0Q= 165 | go.opentelemetry.io/collector/config/configtls v1.17.0/go.mod h1:xUV5/xAHJbwrCuT2rGurBGSUqyFFAVVBcQ5DJAENeCc= 166 | go.opentelemetry.io/collector/config/internal v0.111.0 h1:HTrN9xCpX42xlyDskWbhA/2NkSjMasxNEuGkmjjq7Q8= 167 | go.opentelemetry.io/collector/config/internal v0.111.0/go.mod h1:yC7E4h1Uj0SubxcFImh6OvBHFTjMh99+A5PuyIgDWqc= 168 | go.opentelemetry.io/collector/confmap v1.17.0 h1:5UKHtPGtzNGaOGBsJ6aFpvsKElNUXOVuErBfC0eTWLM= 169 | go.opentelemetry.io/collector/confmap v1.17.0/go.mod h1:GrIZ12P/9DPOuTpe2PIS51a0P/ZM6iKtByVee1Uf3+k= 170 | go.opentelemetry.io/collector/connector v0.111.0 h1:dOaJRO27LyX4ZnkZA51namo2V5idRWvWoMVf4b7obro= 171 | go.opentelemetry.io/collector/connector v0.111.0/go.mod h1:gPwxA1SK+uraSTpX20MG/cNc+axhkBm8+B6z6hh6hYg= 172 | go.opentelemetry.io/collector/connector/connectorprofiles v0.111.0 h1:tJ4+hcWRhknw+cRw6d6dI4CyX3/puqnd1Rg9+mWdwHU= 173 | go.opentelemetry.io/collector/connector/connectorprofiles v0.111.0/go.mod h1:LdfE8hNYcEb+fI5kZp4w3ZGlTLFAmvHAPtTZxS6TZ38= 174 | go.opentelemetry.io/collector/consumer v0.111.0 h1:d2kRTDnu+p0q4D5fTU+Pk59KRm5F2JRYrk30Ep5j0xI= 175 | go.opentelemetry.io/collector/consumer v0.111.0/go.mod h1:FjY9bPbVkFZLKKxnNbGsIqaz3lcFDKGf+7wxA1uCugs= 176 | go.opentelemetry.io/collector/consumer/consumerprofiles v0.111.0 h1:w9kGdTaXdwD/ZtbxVOvuYQEFKBX3THQgEz/enQnMt9s= 177 | go.opentelemetry.io/collector/consumer/consumerprofiles v0.111.0/go.mod h1:Ebt1jDdrQb3G2sNHrWHNr5wS3UJ9k3h8LHCqUPTbxLY= 178 | go.opentelemetry.io/collector/consumer/consumertest v0.111.0 h1:ZEikGRPdrhVAq7xhJVc8WapRBVN/CdPnMEnXgpRGu1U= 179 | go.opentelemetry.io/collector/consumer/consumertest v0.111.0/go.mod h1:EHPrn8ovcTGdTDlCEi1grOXSP3jUUYU0zvl92uA5L+4= 180 | go.opentelemetry.io/collector/exporter v0.111.0 h1:NpiP6xXGOmSi59RlB5gGTB+PtCLldVeK3vCQBJPW0sU= 181 | go.opentelemetry.io/collector/exporter v0.111.0/go.mod h1:FjO80zGWZjqXil8vM1MS8gyxxzZ29WmChTNV2y9xjHo= 182 | go.opentelemetry.io/collector/exporter/exporterprofiles v0.111.0 h1:fpIRPzqsaEtbVip/wsU6h/GMGISo7UjiiYV61MOMEpQ= 183 | go.opentelemetry.io/collector/exporter/exporterprofiles v0.111.0/go.mod h1:NGUTQd1fminFnw289fVQFN4dxdyedK4GTTrJUc9gCtw= 184 | go.opentelemetry.io/collector/exporter/loggingexporter v0.110.0 h1:mKS+unh+v/N8Prkofcqf8N0XbIG5vaR4ipB4LtwsnHc= 185 | go.opentelemetry.io/collector/exporter/loggingexporter v0.110.0/go.mod h1:Tfmci8lM2+3ObzcUzAs+jbYw7gP0L0DDzbnhSwwqM+4= 186 | go.opentelemetry.io/collector/exporter/otlpexporter v0.111.0 h1:eOyd1InTuymfIP4oMzJki28JjpGQzOEK6Y0YlI6pwgA= 187 | go.opentelemetry.io/collector/exporter/otlpexporter v0.111.0/go.mod h1:nOUveQ4KWFqlCA6b0L5DXMosZCcNtit8abEuLHwBaUM= 188 | go.opentelemetry.io/collector/extension v0.111.0 h1:oagGQS3k6Etnm5N5OEkfIWrX4/77t/ZP+B0xfTPUVm8= 189 | go.opentelemetry.io/collector/extension v0.111.0/go.mod h1:ELCpDNpS2qb/31Z8pCMmqTkzfnUV3CanQZMwLW+GCMI= 190 | go.opentelemetry.io/collector/extension/auth v0.111.0 h1:V9DfnMsKdVfsQMeGR5H/nAYHlZnr1Td75kkJOKbCevk= 191 | go.opentelemetry.io/collector/extension/auth v0.111.0/go.mod h1:4O5JQqEdAWuq4giicIy6DKlgkKTC0qgVEJm44RhviZY= 192 | go.opentelemetry.io/collector/extension/experimental/storage v0.111.0 h1:kUJSFjm6IQ6nmcJlfSFPvcEO/XeOP9gJY0Qz9O98DKg= 193 | go.opentelemetry.io/collector/extension/experimental/storage v0.111.0/go.mod h1:qQGvl8Kz2W8b7QywtE8GNqWJMDBo47cjoiIXYuE+/zM= 194 | go.opentelemetry.io/collector/extension/extensioncapabilities v0.111.0 h1:Ps2/2TUbAkxgZu1YxSxDweZDLJx5x7CyNKCINZkLFtY= 195 | go.opentelemetry.io/collector/extension/extensioncapabilities v0.111.0/go.mod h1:q4kBSWsOX62hAp7si+Y0Y0ZXWyCpXjiRuWWz7IL/MDI= 196 | go.opentelemetry.io/collector/extension/zpagesextension v0.111.0 h1:X+YXkJ3kX8c3xN/Mfiqc/gKB7NaQnG4Cge9R60lKOyw= 197 | go.opentelemetry.io/collector/extension/zpagesextension v0.111.0/go.mod h1:v5u5Ots6HgbhKsvRXB+SF9cmVTgkUATNiejHbpsa0rY= 198 | go.opentelemetry.io/collector/featuregate v1.17.0 h1:vpfXyWe7DFqCsDArsR9rAKKtVpt72PKjzjeqPegViws= 199 | go.opentelemetry.io/collector/featuregate v1.17.0/go.mod h1:47xrISO71vJ83LSMm8+yIDsUbKktUp48Ovt7RR6VbRs= 200 | go.opentelemetry.io/collector/internal/globalgates v0.111.0 h1:pPf/U401i/bEJ8ucbYMyqOdkujyZ92Gbm6RFkJrDvBc= 201 | go.opentelemetry.io/collector/internal/globalgates v0.111.0/go.mod h1:HqIBKc8J5Vccn93gkN1uaVK42VbVsuVyjmo5b1MORZo= 202 | go.opentelemetry.io/collector/internal/globalsignal v0.111.0 h1:oq0nSD+7K2Q1Fx5d3s6lPRdKZeTL0FEg4sIaR7ZJzIc= 203 | go.opentelemetry.io/collector/internal/globalsignal v0.111.0/go.mod h1:GqMXodPWOxK5uqpX8MaMXC2389y2XJTa5nPwf8FYDK8= 204 | go.opentelemetry.io/collector/otelcol v0.111.0 h1:RcS1/BDsEBGdI4YjosdElxYwsA2tTtiYEuWjEF0p8vk= 205 | go.opentelemetry.io/collector/otelcol v0.111.0/go.mod h1:B/ri/CwsW7zeLXkCcB3XtarxjJ80eIC+z8guGhFFpis= 206 | go.opentelemetry.io/collector/pdata v1.17.0 h1:z8cjjT2FThAehWu5fbF48OnZyK5q8xd1UhC4XszDo0w= 207 | go.opentelemetry.io/collector/pdata v1.17.0/go.mod h1:yZaQ9KZAm/qie96LTygRKxOXMq0/54h8OW7330ycuvQ= 208 | go.opentelemetry.io/collector/pdata/pprofile v0.111.0 h1:4if6rItcX8a6X4bIh6lwQnlE+ncKXQaIim7F5O7ZA58= 209 | go.opentelemetry.io/collector/pdata/pprofile v0.111.0/go.mod h1:iBwrNFB6za1qspy46ZE41H3MmcxUogn2AuYbrWdoMd8= 210 | go.opentelemetry.io/collector/pdata/testdata v0.111.0 h1:Fqyf1NJ0az+HbsvKSCNw8pfa1Y6c4FhZwlMK4ZulG0s= 211 | go.opentelemetry.io/collector/pdata/testdata v0.111.0/go.mod h1:7SypOzbVtRsCkns6Yxa4GztnkVGkk7b9fW24Ow75q5s= 212 | go.opentelemetry.io/collector/pipeline v0.111.0 h1:qENDGvWWnDXguEfmj8eO+5kr8Y6XFKytU5SuMinz3Ls= 213 | go.opentelemetry.io/collector/pipeline v0.111.0/go.mod h1:ZZMU3019geEU283rTW5M/LkcqLqHp/YI2Nl6/Vp68PQ= 214 | go.opentelemetry.io/collector/processor v0.111.0 h1:85Llb9ekzzvzAXgFaw/n7LHFJ5QAjeOulGJlDLEAR3g= 215 | go.opentelemetry.io/collector/processor v0.111.0/go.mod h1:78Z4f96j9trPFZIRCiQk6nVRo6vua4cW9VYNfHTBsvo= 216 | go.opentelemetry.io/collector/processor/batchprocessor v0.111.0 h1:JoBjX0LjmQ3n22o54sxAN9T6sgxumBLDqq0RElvYAVc= 217 | go.opentelemetry.io/collector/processor/batchprocessor v0.111.0/go.mod h1:8Dw89aInFh4dX3A0iyIcpbQ1A/8hVWtxjrJKyAOb9TQ= 218 | go.opentelemetry.io/collector/processor/processorprofiles v0.111.0 h1:QxnwbqClJvS7zDWgsIaqqDs5YsmHgFvmZKQsmoLTqJM= 219 | go.opentelemetry.io/collector/processor/processorprofiles v0.111.0/go.mod h1:8qPd8Af0XX7Wlupe8JHmdhkKMiiJ5AO7OEFYW3fN0CQ= 220 | go.opentelemetry.io/collector/receiver v0.111.0 h1:6cRHZ9cUxYfRPkArUCkIhoo7Byf6tq/2qvbMIKlhG3s= 221 | go.opentelemetry.io/collector/receiver v0.111.0/go.mod h1:QSl/n9ikDP+6n39QcRY/VLjwQI0qbT1RQp512uBQl3g= 222 | go.opentelemetry.io/collector/receiver/receiverprofiles v0.111.0 h1:oYLAdGMQQR7gB6wVkbV0G4EMsrmiOs3O0qf3hh/3avw= 223 | go.opentelemetry.io/collector/receiver/receiverprofiles v0.111.0/go.mod h1:M/OfdEGnvyB+fSTSW4RPKj5N06FXL8oKSIf60FlrKmM= 224 | go.opentelemetry.io/collector/semconv v0.111.0 h1:ELleMtLBzeZ3xhfhYPmFcLc0hJMqRxhOB0eY60WLivw= 225 | go.opentelemetry.io/collector/semconv v0.111.0/go.mod h1:zCJ5njhWpejR+A40kiEoeFm1xq1uzyZwMnRNX6/D82A= 226 | go.opentelemetry.io/collector/service v0.111.0 h1:6yGjjbZvlYbir+vzi/9ACF965m8i96ScPTjpVvki3ms= 227 | go.opentelemetry.io/collector/service v0.111.0/go.mod h1:tti8TAosPuRj51/bbrSvf6OIJoSyTkywEvTdY/fAuwY= 228 | go.opentelemetry.io/contrib/config v0.10.0 h1:2JknAzMaYjxrHkTnZh3eOme/Y2P5eHE2SWfhfV6Xd6c= 229 | go.opentelemetry.io/contrib/config v0.10.0/go.mod h1:aND2M6/KfNkntI5cyvHriR/zvZgPf8j9yETdSmvpfmc= 230 | go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.55.0 h1:hCq2hNMwsegUvPzI7sPOvtO9cqyy5GbWt/Ybp2xrx8Q= 231 | go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.55.0/go.mod h1:LqaApwGx/oUmzsbqxkzuBvyoPpkxk3JQWnqfVrJ3wCA= 232 | go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.55.0 h1:ZIg3ZT/aQ7AfKqdwp7ECpOK6vHqquXXuyTjIO8ZdmPs= 233 | go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.55.0/go.mod h1:DQAwmETtZV00skUwgD6+0U89g80NKsJE3DCKeLLPQMI= 234 | go.opentelemetry.io/contrib/propagators/b3 v1.30.0 h1:vumy4r1KMyaoQRltX7cJ37p3nluzALX9nugCjNNefuY= 235 | go.opentelemetry.io/contrib/propagators/b3 v1.30.0/go.mod h1:fRbvRsaeVZ82LIl3u0rIvusIel2UUf+JcaaIpy5taho= 236 | go.opentelemetry.io/contrib/zpages v0.55.0 h1:F+xj261Ulwl79QC+2O+IO1b3NbwppUDwN+7LbDSdQcY= 237 | go.opentelemetry.io/contrib/zpages v0.55.0/go.mod h1:dDqDGDfbXSjt/k9orZk4Huulvz1letX1YWTKts5GQpo= 238 | go.opentelemetry.io/otel v1.30.0 h1:F2t8sK4qf1fAmY9ua4ohFS/K+FUuOPemHUIXHtktrts= 239 | go.opentelemetry.io/otel v1.30.0/go.mod h1:tFw4Br9b7fOS+uEao81PJjVMjW/5fvNCbpsDIXqP0pc= 240 | go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.6.0 h1:QSKmLBzbFULSyHzOdO9JsN9lpE4zkrz1byYGmJecdVE= 241 | go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.6.0/go.mod h1:sTQ/NH8Yrirf0sJ5rWqVu+oT82i4zL9FaF6rWcqnptM= 242 | go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.30.0 h1:WypxHH02KX2poqqbaadmkMYalGyy/vil4HE4PM4nRJc= 243 | go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.30.0/go.mod h1:U79SV99vtvGSEBeeHnpgGJfTsnsdkWLpPN/CcHAzBSI= 244 | go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.30.0 h1:VrMAbeJz4gnVDg2zEzjHG4dEH86j4jO6VYB+NgtGD8s= 245 | go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.30.0/go.mod h1:qqN/uFdpeitTvm+JDqqnjm517pmQRYxTORbETHq5tOc= 246 | go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.30.0 h1:lsInsfvhVIfOI6qHVyysXMNDnjO9Npvl7tlDPJFBVd4= 247 | go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.30.0/go.mod h1:KQsVNh4OjgjTG0G6EiNi1jVpnaeeKsKMRwbLN+f1+8M= 248 | go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.30.0 h1:m0yTiGDLUvVYaTFbAvCkVYIYcvwKt3G7OLoN77NUs/8= 249 | go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.30.0/go.mod h1:wBQbT4UekBfegL2nx0Xk1vBcnzyBPsIVm9hRG4fYcr4= 250 | go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.30.0 h1:umZgi92IyxfXd/l4kaDhnKgY8rnN/cZcF1LKc6I8OQ8= 251 | go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.30.0/go.mod h1:4lVs6obhSVRb1EW5FhOuBTyiQhtRtAnnva9vD3yRfq8= 252 | go.opentelemetry.io/otel/exporters/prometheus v0.52.0 h1:kmU3H0b9ufFSi8IQCcxack+sWUblKkFbqWYs6YiACGQ= 253 | go.opentelemetry.io/otel/exporters/prometheus v0.52.0/go.mod h1:+wsAp2+JhuGXX7YRkjlkx6hyWY3ogFPfNA4x3nyiAh0= 254 | go.opentelemetry.io/otel/exporters/stdout/stdoutlog v0.6.0 h1:bZHOb8k/CwwSt0DgvgaoOhBXWNdWqFWaIsGTtg1H3KE= 255 | go.opentelemetry.io/otel/exporters/stdout/stdoutlog v0.6.0/go.mod h1:XlV163j81kDdIt5b5BXCjdqVfqJFy/LJrHA697SorvQ= 256 | go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.30.0 h1:IyFlqNsi8VT/nwYlLJfdM0y1gavxGpEvnf6FtVfZ6X4= 257 | go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.30.0/go.mod h1:bxiX8eUeKoAEQmbq/ecUT8UqZwCjZW52yJrXJUSozsk= 258 | go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.30.0 h1:kn1BudCgwtE7PxLqcZkErpD8GKqLZ6BSzeW9QihQJeM= 259 | go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.30.0/go.mod h1:ljkUDtAMdleoi9tIG1R6dJUpVwDcYjw3J2Q6Q/SuiC0= 260 | go.opentelemetry.io/otel/log v0.6.0 h1:nH66tr+dmEgW5y+F9LanGJUBYPrRgP4g2EkmPE3LeK8= 261 | go.opentelemetry.io/otel/log v0.6.0/go.mod h1:KdySypjQHhP069JX0z/t26VHwa8vSwzgaKmXtIB3fJM= 262 | go.opentelemetry.io/otel/metric v1.30.0 h1:4xNulvn9gjzo4hjg+wzIKG7iNFEaBMX00Qd4QIZs7+w= 263 | go.opentelemetry.io/otel/metric v1.30.0/go.mod h1:aXTfST94tswhWEb+5QjlSqG+cZlmyXy/u8jFpor3WqQ= 264 | go.opentelemetry.io/otel/sdk v1.30.0 h1:cHdik6irO49R5IysVhdn8oaiR9m8XluDaJAs4DfOrYE= 265 | go.opentelemetry.io/otel/sdk v1.30.0/go.mod h1:p14X4Ok8S+sygzblytT1nqG98QG2KYKv++HE0LY/mhg= 266 | go.opentelemetry.io/otel/sdk/log v0.6.0 h1:4J8BwXY4EeDE9Mowg+CyhWVBhTSLXVXodiXxS/+PGqI= 267 | go.opentelemetry.io/otel/sdk/log v0.6.0/go.mod h1:L1DN8RMAduKkrwRAFDEX3E3TLOq46+XMGSbUfHU/+vE= 268 | go.opentelemetry.io/otel/sdk/metric v1.30.0 h1:QJLT8Pe11jyHBHfSAgYH7kEmT24eX792jZO1bo4BXkM= 269 | go.opentelemetry.io/otel/sdk/metric v1.30.0/go.mod h1:waS6P3YqFNzeP01kuo/MBBYqaoBJl7efRQHOaydhy1Y= 270 | go.opentelemetry.io/otel/trace v1.30.0 h1:7UBkkYzeg3C7kQX8VAidWh2biiQbtAKjyIML8dQ9wmc= 271 | go.opentelemetry.io/otel/trace v1.30.0/go.mod h1:5EyKqTzzmyqB9bwtCCq6pDLktPK6fmGf/Dph+8VI02o= 272 | go.opentelemetry.io/proto/otlp v1.3.1 h1:TrMUixzpM0yuc/znrFTP9MMRh8trP93mkCiDVeXrui0= 273 | go.opentelemetry.io/proto/otlp v1.3.1/go.mod h1:0X1WI4de4ZsLrrJNLAQbFeLCm3T7yBkR0XqQ7niQU+8= 274 | go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= 275 | go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= 276 | go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= 277 | go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= 278 | go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= 279 | go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= 280 | golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= 281 | golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= 282 | golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= 283 | golang.org/x/exp v0.0.0-20241004190924-225e2abe05e6 h1:1wqE9dj9NpSm04INVsJhhEUzhuDVjbcyKH91sVyPATw= 284 | golang.org/x/exp v0.0.0-20241004190924-225e2abe05e6/go.mod h1:NQtJDoLvd6faHhE7m4T/1IY708gDefGGjR/iUW8yQQ8= 285 | golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= 286 | golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= 287 | golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 288 | golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= 289 | golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 290 | golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 291 | golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= 292 | golang.org/x/net v0.34.0 h1:Mb7Mrk043xzHgnRM88suvJFwzVrRfHEHJEl5/71CKw0= 293 | golang.org/x/net v0.34.0/go.mod h1:di0qlW3YNM5oh6GqDGQr92MyTozJPmybPK4Ev/Gm31k= 294 | golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 295 | golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 296 | golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 297 | golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 298 | golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 299 | golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 300 | golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 301 | golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 302 | golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 303 | golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 304 | golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 305 | golang.org/x/sys v0.29.0 h1:TPYlXGxvx1MGTn2GiZDhnjPA9wZzZeGKHHmKhHYvgaU= 306 | golang.org/x/sys v0.29.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= 307 | golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= 308 | golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= 309 | golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= 310 | golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= 311 | golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= 312 | golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= 313 | golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= 314 | golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= 315 | golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= 316 | golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= 317 | golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= 318 | golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= 319 | gonum.org/v1/gonum v0.15.1 h1:FNy7N6OUZVUaWG9pTiD+jlhdQ3lMP+/LcTpJ6+a8sQ0= 320 | gonum.org/v1/gonum v0.15.1/go.mod h1:eZTZuRFrzu5pcyjN5wJhcIhnUdNijYxX1T2IcrOGY0o= 321 | google.golang.org/genproto/googleapis/api v0.0.0-20241007155032-5fefd90f89a9 h1:T6rh4haD3GVYsgEfWExoCZA2o2FmbNyKpTuAxbEFPTg= 322 | google.golang.org/genproto/googleapis/api v0.0.0-20241007155032-5fefd90f89a9/go.mod h1:wp2WsuBYj6j8wUdo3ToZsdxxixbvQNAHqVJrTgi5E5M= 323 | google.golang.org/genproto/googleapis/rpc v0.0.0-20241007155032-5fefd90f89a9 h1:QCqS/PdaHTSWGvupk2F/ehwHtGc0/GYkT+3GAcR1CCc= 324 | google.golang.org/genproto/googleapis/rpc v0.0.0-20241007155032-5fefd90f89a9/go.mod h1:GX3210XPVPUjJbTUbvwI8f2IpZDMZuPJWDzDuebbviI= 325 | google.golang.org/grpc v1.67.1 h1:zWnc1Vrcno+lHZCOofnIMvycFcc0QRGIzm9dhnDX68E= 326 | google.golang.org/grpc v1.67.1/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= 327 | google.golang.org/protobuf v1.35.1 h1:m3LfL6/Ca+fqnjnlqQXNpFPABW1UD7mjh8KO2mKFytA= 328 | google.golang.org/protobuf v1.35.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= 329 | gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= 330 | gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= 331 | gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= 332 | gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= 333 | gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= 334 | gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= 335 | gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 336 | gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= 337 | gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= 338 | gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= 339 | gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= 340 | -------------------------------------------------------------------------------- /installers/linux/Makefile: -------------------------------------------------------------------------------- 1 | ## Makefile for building Linux installer 2 | ## Run this from within the `installers/linux` directory. 3 | ## 4 | ## This will create a binary DEB package containing the executable, 5 | ## various scripts, and the various YML files. 6 | ## 7 | ## NOTE To streamline enterprise deployment, you should customize 8 | ## NOTE the various YML files before building your DEB. 9 | ################################################################ 10 | 11 | GOOS := $(shell go env GOOS) 12 | GOARCH := $(shell go env GOARCH) 13 | 14 | ################################################################ 15 | # VER is the version of the trace2receiver that we are using. 16 | # Since the collector is generated source, its version number 17 | # isn't that interesting. 18 | # 19 | # You might have to override this if you build from an @latest, 20 | # a SHA, or other GOLANG module specification. 21 | 22 | VER := $(shell go list -m github.com/git-ecosystem/trace2receiver | awk '{print $$2}') 23 | 24 | # Strip the leading 'v' per debian conventions. 25 | 26 | NVER := $(shell echo $(VER) | sed 's/^v//') 27 | 28 | ################################################################ 29 | 30 | DST := ./_out_/_layout_/usr/local/sample-trace2-otel-collector 31 | DEBIAN := ./_out_/_layout_/DEBIAN 32 | ETC := ./_out_/_layout_/etc/systemd/system 33 | 34 | ################################################################ 35 | 36 | .PHONY: default 37 | default: layout package 38 | 39 | ################################################################ 40 | 41 | .PHONY: layout 42 | layout: 43 | @echo "======== Creating Layout ========" 44 | @echo "GOOS is $(GOOS)" 45 | @echo "GOARCH is $(GOARCH)" 46 | @uname -a 47 | @echo 48 | 49 | # Create the basic on-disk layout for the our installation directory. 50 | 51 | rm -rf _out_/_layout_ 52 | 53 | mkdir -p $(DST) 54 | mkdir -p $(DST)/bin 55 | mkdir -p $(DST)/logs 56 | mkdir -p $(DST)/scripts 57 | 58 | cp ../../sample-configs/unix/*.yml $(DST)/ 59 | 60 | cp ./scripts/* $(DST)/scripts/ 61 | chmod 755 $(DST)/scripts/* 62 | 63 | cp ../../sample-trace2-otel-collector $(DST)/bin/ 64 | chmod 755 $(DST)/bin/sample-trace2-otel-collector 65 | 66 | # Create ETC for systemd(1). 67 | 68 | mkdir -p $(ETC) 69 | cp ./sample-trace2-otel-collector.service $(ETC)/ 70 | 71 | # Create DEBIAN files for package. 72 | 73 | mkdir -p $(DEBIAN) 74 | 75 | for f in ./deb-scripts/* ; do \ 76 | echo "Copying $$f..."; \ 77 | cat $$f \ 78 | | sed -e 's/X_VER_X/$(VER)/' \ 79 | > $(DEBIAN)/$$(basename $$f); \ 80 | done 81 | chmod 755 $(DEBIAN)/* 82 | 83 | cat ./control \ 84 | | sed -e 's/X_NVER_X/$(NVER)/' \ 85 | | sed -e 's/X_GOARCH_X/$(GOARCH)/' \ 86 | > $(DEBIAN)/control 87 | 88 | 89 | .PHONY: package 90 | package: 91 | @echo "======== Creating Package ========" 92 | @echo 93 | 94 | rm -rf _out_/_pkg_ 95 | mkdir -p _out_/_pkg_ 96 | 97 | dpkg-deb \ 98 | -Zxz \ 99 | --build _out_/_layout_ \ 100 | "_out_/_pkg_/sample-trace2-otel-collector_$(NVER)_$(GOOS)-$(GOARCH).deb" 101 | 102 | 103 | .PHONY: clean 104 | clean: 105 | rm -rf _out_ 106 | -------------------------------------------------------------------------------- /installers/linux/control: -------------------------------------------------------------------------------- 1 | Package: sample-trace2-otel-collector 2 | Version: X_NVER_X 3 | Section: vcs 4 | Priority: optional 5 | Architecture: X_GOARCH_X 6 | Depends: 7 | Maintainer: Your Name 8 | Description: Sample Trace2 OpenTelemetry Collector 9 | -------------------------------------------------------------------------------- /installers/linux/deb-scripts/postinst: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Pseudo user identity that the collector service will use. This 4 | # should be the name of a "system" UID with very few privileges and no 5 | # shell or login. It will only own a few files and directories in the 6 | # install directory so that it can create the Unix domain socket and 7 | # write to the stdout/stderr logs. 8 | # 9 | # We will create it during the install -- if it doesn't already exist 10 | # (from a previous installation). 11 | # 12 | # The username chosen here must match the `User=` and `Group=` keys 13 | # in the `.service` file. 14 | 15 | USERNAME=trace2 16 | 17 | INSTALL_LOCATION=/usr/local/sample-trace2-otel-collector 18 | 19 | mkdir -p "$INSTALL_LOCATION/logs" 20 | LOGFILE="$INSTALL_LOCATION/logs/install.txt" 21 | exec >>$LOGFILE 2>&1 22 | 23 | echo "" 24 | echo "" 25 | echo "" 26 | echo "================================================================" 27 | echo "postinst: X_VER_X" 28 | echo "================================================================" 29 | echo "" 30 | date 31 | 32 | set -x 33 | 34 | grep "^$USERNAME:" /etc/passwd 35 | if [ $? -eq 0 ] 36 | then 37 | echo "Using existing pseudo user $USERNAME" 38 | else 39 | echo "Trying to create system pseudo user $USERNAME" 40 | 41 | /usr/sbin/adduser --system --group --no-create-home $USERNAME 42 | RESULT=$? 43 | if [ $RESULT -ne 0 ] 44 | then 45 | echo "Could not create pseudo user $USERNAME" 46 | exit $RESULT 47 | fi 48 | fi 49 | 50 | # Let the service process own the install directory so that it can 51 | # create the Unix domain socket in it. Also recursively give it 52 | # the logs directory so that it can create/extend the 53 | # stdout/stderr logs. 54 | 55 | chown $USERNAME:$USERNAME $INSTALL_LOCATION 56 | chown -R $USERNAME:$USERNAME $INSTALL_LOCATION/logs 57 | 58 | echo Attempting to start sample-trace2-otel-collector 59 | $INSTALL_LOCATION/scripts/service_start 60 | 61 | -------------------------------------------------------------------------------- /installers/linux/deb-scripts/prerm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | INSTALL_LOCATION=/usr/local/sample-trace2-otel-collector 4 | 5 | mkdir -p "$INSTALL_LOCATION/logs" 6 | LOGFILE="$INSTALL_LOCATION/logs/install.txt" 7 | exec >>$LOGFILE 2>&1 8 | 9 | echo "" 10 | echo "" 11 | echo "" 12 | echo "================================================================" 13 | echo "prerm: X_VER_X" 14 | echo "================================================================" 15 | echo "" 16 | date 17 | 18 | set -x 19 | 20 | echo Attempting to stop sample-trace2-otel-collector 21 | $INSTALL_LOCATION/scripts/service_stop 22 | -------------------------------------------------------------------------------- /installers/linux/sample-trace2-otel-collector.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Sample Trace2 OpenTelemetry Collector 3 | After=network.target 4 | 5 | [Service] 6 | ExecStart=/usr/local/sample-trace2-otel-collector/bin/sample-trace2-otel-collector --config=/usr/local/sample-trace2-otel-collector/config.yml 7 | KillMode=mixed 8 | Restart=on-failure 9 | Type=simple 10 | User=trace2 11 | Group=trace2 12 | 13 | [Install] 14 | WantedBy=multi-user.target 15 | -------------------------------------------------------------------------------- /installers/linux/scripts/service_start: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | INSTALL_LOCATION=/usr/local/sample-trace2-otel-collector 4 | 5 | set -x 6 | 7 | if command -v systemctl >/dev/null 2>&1 8 | then 9 | systemctl enable sample-trace2-otel-collector.service 10 | if [ -f $INSTALL_LOCATION/config.yml ] 11 | then 12 | systemctl start sample-trace2-otel-collector.service 13 | fi 14 | fi 15 | 16 | ## Point Trace2 telemetry events from all Git commands to the Unix 17 | ## domain socket where our service will listen. This value (after the 18 | ## "af_unix:" prefix, must match the value of the "socket" field in 19 | ## the "config.yml" file that you start the service with and this is 20 | ## specified in the "sample-trace2-otel-collector.service" file. 21 | ## 22 | ET="af_unix:$INSTALL_LOCATION/trace2.socket" 23 | 24 | ## Enable Trace2 telemetry from all Git commands using a system-level 25 | ## config setting. 26 | ## 27 | ## Set "trace2.configParams" in anticipation of using ruleset filtering 28 | ## with the "otel.trace2.*" keys described in the examples. 29 | ## 30 | ## Note that "/usr/bin/git" thinks the system config is in "/etc/gitconfig". 31 | ## And "/usr/local/bin/git" thinks that it is in "/usr/local/git/etc/gitconfig". 32 | ## 33 | ## Set system values using both versions of Git, if installed. 34 | 35 | for g in /usr/bin/git /usr/local/bin/git 36 | do 37 | if [ -x "$g" ] 38 | then 39 | $g config --system trace2.eventtarget $ET 40 | $g config --system trace2.configparams 'otel.trace2.*' 41 | $g config --system --list --show-origin | /usr/bin/grep -i trace2 42 | fi 43 | done 44 | -------------------------------------------------------------------------------- /installers/linux/scripts/service_stop: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -x 4 | 5 | INSTALL_LOCATION=/usr/local/sample-trace2-otel-collector 6 | 7 | ## Unset the system-level Git config values set when the service was started. 8 | ## 9 | ## Note that "/usr/bin/git" thinks the system config is in "/etc/gitconfig". 10 | ## And "/usr/local/bin/git" thinks that it is in "/usr/local/git/etc/gitconfig". 11 | 12 | for g in /usr/bin/git /usr/local/bin/git 13 | do 14 | if [ -x "$g" ] 15 | then 16 | $g config --system --unset trace2.eventtarget 17 | $g config --system --unset trace2.configparams 18 | fi 19 | done 20 | 21 | if command -v systemctl >/dev/null 2>&1 22 | then 23 | systemctl stop sample-trace2-otel-collector.service 24 | systemctl disable sample-trace2-otel-collector.service 25 | fi 26 | -------------------------------------------------------------------------------- /installers/macos/Makefile: -------------------------------------------------------------------------------- 1 | ## Makefile for building macOS installer 2 | ## Run this from within the `installers/macos` directory. 3 | ## 4 | ## This will create a PKG containing the executable, various 5 | ## scripts, and the various YML files. 6 | ## 7 | ## NOTE To streamline enterprise deployment, you should customize 8 | ## NOTE the various YML files that are bundled into the overlay 9 | ## NOTE before building your PKG. 10 | ################################################################ 11 | 12 | GOOS := $(shell go env GOOS) 13 | GOARCH := $(shell go env GOARCH) 14 | 15 | ################################################################ 16 | # VER is the version of the trace2receiver that we are using. 17 | # Since the collector is generated source, its version number 18 | # isn't that interesting. 19 | # 20 | # You might have to override this if you build from an @latest, 21 | # a SHA, or other GOLANG module specification. 22 | 23 | VER := $(shell go list -m github.com/git-ecosystem/trace2receiver | awk '{print $$2}') 24 | 25 | # Strip the leading 'v' for use in the .pkg filename. 26 | 27 | NVER := $(shell echo $(VER) | sed 's/^v//') 28 | 29 | ################################################################ 30 | 31 | LAY := ./_out_/_layout_/sample-trace2-otel-collector 32 | OVR := ./_out_/_overlay_/sample-trace2-otel-collector 33 | 34 | ################################################################ 35 | 36 | .PHONY: default 37 | default: layout package 38 | 39 | ################################################################ 40 | 41 | # Create the on-disk layouts for our two component packages. These 42 | # describe the basic structure of the directory, the binary components, 43 | # scripts, and etc. 44 | # 45 | # They will both target the same `/usr/local/sample-trace2-otel-collector` 46 | # installation directory. That is, one is an overlay for the other. 47 | 48 | .PHONY: layout 49 | layout: 50 | @echo "======== Creating Layouts ========" 51 | @echo "GOOS is $(GOOS)" 52 | @echo "GOARCH is $(GOARCH)" 53 | @uname -a 54 | @echo 55 | 56 | # Create the basic on-disk layout for the basic structure of the 57 | # directory, the binary components, scripts, and etc. 58 | # 59 | # We DO NOT include the YML files in the basic layout. 60 | 61 | rm -rf _out_/_layout_ 62 | mkdir -p $(LAY) 63 | mkdir -p $(LAY)/bin 64 | mkdir -p $(LAY)/logs 65 | mkdir -p $(LAY)/scripts 66 | 67 | cp ./com.git-ecosystem.sample-trace2-otel-collector.plist $(LAY)/ 68 | 69 | cp ./uninstaller.sh $(LAY)/ 70 | chmod 755 $(LAY)/uninstaller.sh 71 | 72 | for f in ./postinstall ./preinstall ./service_start ./service_stop ; do \ 73 | echo "Copying $$f..."; \ 74 | cat $$f \ 75 | | sed -e 's/X_VER_X/$(VER)/' \ 76 | > $(LAY)/scripts/$$(basename $$f); \ 77 | done 78 | chmod 755 $(LAY)/scripts/* 79 | 80 | cp ../../sample-trace2-otel-collector $(LAY)/bin/ 81 | chmod 755 $(LAY)/bin/sample-trace2-otel-collector 82 | 83 | find $(LAY) -name '*.DS_Store' -type f -delete 84 | /usr/bin/xattr -rc * */* 85 | 86 | 87 | # Create the on-disk overlay layout for customization files that we 88 | # want to install on top of the basic layout. 89 | # 90 | # Put all of the YML files in the overlay package. 91 | 92 | @echo 93 | @echo "======== Creating Overlay Layout ========" 94 | @echo 95 | 96 | rm -rf _out_/_overlay_ 97 | mkdir -p $(OVR) 98 | 99 | cp ../../sample-configs/unix/*.yml $(OVR)/ 100 | 101 | find $(OVR) -name '*.DS_Store' -type f -delete 102 | /usr/bin/xattr -rc * */* 103 | 104 | 105 | # Component PKGs are pieces. Distrubtion PKGs are installable. 106 | # Create components for the basic layout and the overlay layout. 107 | # Then create a distribution PKG containing both of them. 108 | 109 | .PHONY: package 110 | package: 111 | @echo "======== Creating Packages ========" 112 | @echo 113 | 114 | # ================================ 115 | # Build base component package. 116 | # ================================ 117 | 118 | rm -rf _out_/_component_ 119 | mkdir -p _out_/_component_ 120 | 121 | /usr/bin/pkgbuild \ 122 | --root "$(LAY)" \ 123 | --install-location "/usr/local/sample-trace2-otel-collector" \ 124 | --scripts "$(LAY)/scripts/" \ 125 | --identifier "com.git-ecosystem.sample-trace2-otel-collector" \ 126 | --version "$(VER)" \ 127 | "_out_/_component_/com.git-ecosystem.sample-trace2-otel-collector.component.pkg" 128 | 129 | # TODO sign the above. 130 | 131 | # ================================ 132 | # Build overlay component package. 133 | # ================================ 134 | 135 | /usr/bin/pkgbuild \ 136 | --root "$(OVR)" \ 137 | --install-location "/usr/local/sample-trace2-otel-collector" \ 138 | --identifier "com.git-ecosystem.sample-trace2-otel-collector.overlay" \ 139 | --version "$(VER)" \ 140 | "_out_/_component_/com.git-ecosystem.sample-trace2-otel-collector.overlay.pkg" 141 | 142 | # TODO sign the above. 143 | 144 | # ================================ 145 | # Built default distribution package using our two component packages. 146 | # ================================ 147 | 148 | rm -rf _out_/_pkg_ 149 | mkdir -p _out_/_pkg_ 150 | 151 | /usr/bin/productbuild \ 152 | --distribution "./distribution.$(GOARCH).xml" \ 153 | --package-path "./_out_/_component_/" \ 154 | --identifier "com.git-ecosystem.sample-trace2-otel-collector.dist" \ 155 | --version "$(VER)" \ 156 | "_out_/_pkg_/sample-trace2-otel-collector_$(NVER)_$(GOOS)-$(GOARCH).pkg" 157 | 158 | # TODO sign and notarize the above. 159 | 160 | 161 | .PHONY: clean 162 | clean: 163 | rm -rf _out_ 164 | -------------------------------------------------------------------------------- /installers/macos/com.git-ecosystem.sample-trace2-otel-collector.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Label 6 | com.git-ecosystem.sample-trace2-otel-collector 7 | 8 | WorkingDirectory 9 | /usr/local/sample-trace2-otel-collector/bin 10 | 11 | UserName 12 | _trace2 13 | 14 | ProgramArguments 15 | 16 | /usr/local/sample-trace2-otel-collector/bin/sample-trace2-otel-collector 17 | --config 18 | /usr/local/sample-trace2-otel-collector/config.yml 19 | 20 | 21 | KeepAlive 22 | 23 | 24 | StandardErrorPath 25 | /usr/local/sample-trace2-otel-collector/logs/stderr.txt 26 | 27 | StandardOutPath 28 | /usr/local/sample-trace2-otel-collector/logs/stdout.txt 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /installers/macos/distribution.amd64.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Sample Trace2 OpenTelemetry Collector 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | com.git-ecosystem.sample-trace2-otel-collector.component.pkg 31 | 32 | 33 | 34 | 35 | com.git-ecosystem.sample-trace2-otel-collector.overlay.pkg 36 | 37 | 38 | -------------------------------------------------------------------------------- /installers/macos/distribution.arm64.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Sample Trace2 OpenTelemetry Collector 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | com.git-ecosystem.sample-trace2-otel-collector.component.pkg 31 | 32 | 33 | 34 | 35 | com.git-ecosystem.sample-trace2-otel-collector.overlay.pkg 36 | 37 | 38 | -------------------------------------------------------------------------------- /installers/macos/postinstall: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | ################################################################## 3 | 4 | USERNAME=_trace2 5 | 6 | INSTALL_LOCATION=/usr/local/sample-trace2-otel-collector 7 | chown $USERNAME "$INSTALL_LOCATION" 8 | 9 | ## Since this script is run by the package manager (rather than from a command 10 | ## line) we lose the normal stdout/stderr. So direct all stdout and stderr 11 | ## for the rest of the life of this process into a log file. 12 | 13 | mkdir -p "$INSTALL_LOCATION/logs" 14 | LOGFILE="$INSTALL_LOCATION/logs/install.txt" 15 | exec >>$LOGFILE 2>&1 16 | 17 | chown -R $USERNAME "$INSTALL_LOCATION/logs" 18 | 19 | echo "" 20 | echo "" 21 | echo "" 22 | echo "================================================================" 23 | echo "postinstall: X_VER_X" 24 | echo "================================================================" 25 | echo "" 26 | date 27 | 28 | set -x 29 | 30 | ## Integrate with launchctl... 31 | cp $INSTALL_LOCATION/com.git-ecosystem.sample-trace2-otel-collector.plist /Library/LaunchDaemons/ 32 | 33 | echo Attempting to start sample-trace2-otel-collector 34 | $INSTALL_LOCATION/scripts/service_start 35 | -------------------------------------------------------------------------------- /installers/macos/preinstall: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | ################################################################## 3 | 4 | # USERNAME is the name of the pseudo user that we want the daemon to 5 | # run as. This is a low privileged / non-interactive account. The 6 | # name here must match the name in `postinstall` and in the `plist`. 7 | # The string must begin with a "_" on macos. 8 | 9 | USERNAME=_trace2 10 | 11 | INSTALL_LOCATION=/usr/local/sample-trace2-otel-collector 12 | 13 | mkdir -p "$INSTALL_LOCATION/logs" 14 | LOGFILE="$INSTALL_LOCATION/logs/install.txt" 15 | exec >>$LOGFILE 2>&1 16 | 17 | echo "" 18 | echo "" 19 | echo "" 20 | echo "================================================================" 21 | echo "preinstall: X_VER_X" 22 | echo "================================================================" 23 | echo "" 24 | date 25 | 26 | set -x 27 | 28 | if [ -e $INSTALL_LOCATION/scripts/service_stop ] 29 | then 30 | ## Force stop a previous installation before trying to install 31 | ## and start the current one. 32 | 33 | echo Attempting to stop sample-trace2-otel-collector 34 | $INSTALL_LOCATION/scripts/service_stop 35 | fi 36 | 37 | # We need to ensure that there is a psuedo user (aka role) account for 38 | # our daemon, so that the daemon runs with minimal permissions and not 39 | # as the usual logged in user. This is similar to the "nobody" 40 | # account. 41 | 42 | dscl . read /Users/$USERNAME >/dev/null 2>/dev/null 43 | if [ $? -eq 0 ] 44 | then 45 | echo "Using existing pseudo user $USERNAME" 46 | exit 0 47 | fi 48 | 49 | # We need to create a new pseudo user using a "role account". These 50 | # have UIDs in the 200-400 range. 51 | # 52 | # Apple does not give us any tools to find or request an unused UID, 53 | # so we have to search for an unused UID. 54 | # 55 | # Find all of the already used role account UIDs and exclude them from 56 | # the allowable range. Build the free set backwards, so that we're not 57 | # as likely to collide with well-known services (that may not 58 | # currently be installed). 59 | 60 | USED_IDS=$(dscl . list /Users UniqueID | awk '{ if ($2 >= 200 && $2 < 400) print $2}' | sort -n) 61 | FREE_IDS="" 62 | for k in {200..399} 63 | do 64 | echo $USED_IDS | grep -v -q $k && FREE_IDS="$k $FREE_IDS" 65 | done 66 | 67 | if [ ${#FREE_IDS} -eq 0 ] 68 | then 69 | echo "No free UIDs available for new pseudo user $USERNAME." 70 | exit 1 71 | fi 72 | 73 | # We probably only need to try to create the pseudo user using the 74 | # first free UID in our list, but lets try others if we get an error. 75 | # 76 | # 'sysadminctl' sets an exit code if we are not running as root (as 77 | # expected). However, when running as root, it does not always set 78 | # an exit code. For example, if the chosen UID is already in use, 79 | # it prints a warning, but does not set the exit code. So we need to 80 | # check the user database to confirm that it was actually created. 81 | # 82 | # I'm not sure if root will ever get a non-zero status, so if it does 83 | # I'm going to assume something is seriously wrong and give up. 84 | # 85 | # NEEDSWORK: The value of the GID is another mess. There is another 86 | # list/database of groups and group memberships and their numeric IDs 87 | # are unrelated to the UID numbers. And I couldn't find a similar 88 | # `sysadminctl` command for creating a group; from what I could tell 89 | # you still have to use 5 or 6 `dscl . create /Group ...` commands. 90 | # I'm not going to bother with that. We only need the pseudo user ID 91 | # so that the daemon will run with low privileges and we only need to 92 | # do a `chown` on a few files in the installation directory; we don't 93 | # actually need a specific group. So we DO NOT use the `-GID` argument 94 | # and let the UID inherit the default group (probably `staff`). 95 | 96 | for k in $FREE_IDS 97 | do 98 | echo "Trying to create pseudo user $USERNAME with UID $k." 99 | 100 | sysadminctl -addUser $USERNAME -fullName "Git OTEL Telemetry" -UID $k -roleAccount 101 | RESULT=$? 102 | if [ $RESULT -ne 0 ] 103 | then 104 | echo "Could not create a pseudo user for $USERNAME" 105 | exit $RESULT 106 | fi 107 | 108 | dscl . read /Users/$USERNAME >/dev/null 2>/dev/null 109 | RESULT=$? 110 | if [ $RESULT -eq 0 ] 111 | then 112 | echo "Pseudo user $USERNAME successfully created with UID $k." 113 | exit 0 114 | fi 115 | done 116 | 117 | echo "Could not create a pseudo user for $USERNAME" 118 | exit 1 119 | -------------------------------------------------------------------------------- /installers/macos/service_start: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | ################################################################## 3 | 4 | set -x 5 | 6 | INSTALL_LOCATION=/usr/local/sample-trace2-otel-collector 7 | 8 | /bin/launchctl load /Library/LaunchDaemons/com.git-ecosystem.sample-trace2-otel-collector.plist 9 | 10 | ## Point Trace2 telemetry events from all Git commands to the Unix 11 | ## domain socket where our service will listen. This value (after 12 | ## the "af_unix:" prefix, must match the value of the "socket" 13 | ## field in the "config.yml" file that you start the service with 14 | ## and this is specified in the plist file. 15 | ## 16 | ET="af_unix:$INSTALL_LOCATION/trace2.socket" 17 | 18 | ## Enable Trace2 telemetry from all Git commands using a system-level 19 | ## config setting. 20 | ## 21 | ## Set "trace2.configParams" in anticipation of using ruleset filtering 22 | ## with the "otel.trace2.*" keys described in the examples. 23 | ## 24 | ## There may be several versions of Git installed on the system and 25 | ## they each have their own notion of where the system config is 26 | ## stored, so try each of them. 27 | 28 | for g in /usr/bin/git /usr/local/bin/git /opt/homebrew/bin/git 29 | do 30 | if [ -x "$g" ] 31 | then 32 | $g config --system trace2.eventtarget $ET 33 | $g config --system trace2.configparams 'otel.trace2.*' 34 | $g config --system --list --show-origin | /usr/bin/grep -i trace2 35 | fi 36 | done 37 | -------------------------------------------------------------------------------- /installers/macos/service_stop: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | ################################################################## 3 | 4 | set -x 5 | 6 | INSTALL_LOCATION=/usr/local/sample-trace2-otel-collector 7 | 8 | ## Unset the system-level Git config values set when the service was started. 9 | 10 | for g in /usr/bin/git /usr/local/bin/git /opt/homebrew/bin/git 11 | do 12 | if [ -x "$g" ] 13 | then 14 | $g config --system --unset trace2.eventtarget 15 | $g config --system --unset trace2.configparams 16 | fi 17 | done 18 | 19 | /bin/launchctl unload /Library/LaunchDaemons/com.git-ecosystem.sample-trace2-otel-collector.plist 20 | -------------------------------------------------------------------------------- /installers/macos/uninstaller.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | ## Uninstaller for sample-trace2-otel-collector (as installed by the release .pkg) 3 | ################################################################## 4 | 5 | set -x 6 | 7 | INSTALL_LOCATION=/usr/local/sample-trace2-otel-collector 8 | 9 | echo "Stopping service..." 10 | if [ -e $INSTALL_LOCATION/scripts/service_stop ] 11 | then 12 | ## Force stop the service. 13 | $INSTALL_LOCATION/scripts/service_stop 14 | fi 15 | 16 | echo "Disassociate from Launchctl..." 17 | /bin/rm -f /Library/LaunchDaemons/com.git-ecosystem.sample-trace2-otel-collector.plist 18 | 19 | echo "Unset system config variables set by scripts/postinstall..." 20 | 21 | for g in /usr/bin/git /usr/local/bin/git 22 | do 23 | if [ -x "$g" ] 24 | then 25 | $g config --system --unset trace2.eventtarget 26 | $g config --system --unset trace2.configparams 27 | fi 28 | done 29 | 30 | echo "Removing application directory $INSTALL_LOCATION..." 31 | /bin/rm -rf $INSTALL_LOCATION 32 | -------------------------------------------------------------------------------- /installers/windows_bash/Makefile: -------------------------------------------------------------------------------- 1 | ## GNU Makefile for building Windows distribution using the Git SDK. 2 | ## This includes bash and the msys2 development tools. The resulting 3 | ## install and registration scripts will also use bash. 4 | ## 5 | ## Run this from within the `installers/windows` directory. 6 | ## 7 | ## This will create a ZIP file containing the executable, various 8 | ## scripts, and the various YML files. 9 | ## 10 | ## NOTE To streamline enterprise deployment, you should customize 11 | ## NOTE the various YML files before building the ZIP file. 12 | ## NOTE Eventually, you will probably want to create a real 13 | ## NOTE Windows installer from these pieces. 14 | ################################################################ 15 | 16 | GOOS := $(shell go env GOOS) 17 | GOARCH := $(shell go env GOARCH) 18 | 19 | ################################################################ 20 | # VER is the version of the trace2receiver that we are using. 21 | # Since the collector is generated source, its version number 22 | # isn't that interesting. 23 | # 24 | # You might have to override this if you build from an @latest, 25 | # a SHA, or other GOLANG module specification. 26 | 27 | VER := $(shell go list -m github.com/git-ecosystem/trace2receiver | awk '{print $$2}') 28 | 29 | # Strip the leading 'v' for use in the .pkg filename. 30 | 31 | NVER := $(shell echo $(VER) | sed 's/^v//') 32 | 33 | ################################################################ 34 | 35 | ZIPNAME := sample-trace2-otel-collector_$(NVER)_$(GOOS)-$(GOARCH) 36 | 37 | ################################################################ 38 | 39 | DST := ./_out_/$(ZIPNAME) 40 | 41 | .PHONY: layout 42 | layout: 43 | @echo "======== Creating Layout ========" 44 | @echo "GOOS is $(GOOS)" 45 | @echo "GOARCH is $(GOARCH)" 46 | @uname -a 47 | @echo 48 | 49 | rm -rf _out_ 50 | 51 | mkdir -p $(DST) 52 | 53 | cp ../../sample-trace2-otel-collector.exe $(DST)/ 54 | 55 | for f in ./install.sh ./register.sh ./unregister.sh ; do \ 56 | echo "Copying $$f..."; \ 57 | cat $$f \ 58 | | sed -e 's/X_VER_X/$(VER)/' \ 59 | > $(DST)/$$(basename $$f); \ 60 | done 61 | 62 | cp ../../sample-configs/windows/*.yml $(DST)/ 63 | 64 | 65 | .PHONY: package 66 | package: 67 | @echo "======== Creating ZIP Package ========" 68 | @echo 69 | 70 | ( cd "_out_"; \ 71 | if (type -P pwsh.exe) \ 72 | then \ 73 | pwsh.exe -Command 'Compress-Archive -DestinationPath "./$(ZIPNAME).zip" -Path "$(ZIPNAME)/"'; \ 74 | elif (type -P powershell.exe) \ 75 | then \ 76 | powershell.exe -Command 'Compress-Archive -DestinationPath "./$(ZIPNAME).zip" -Path "$(ZIPNAME)/"'; \ 77 | else \ 78 | echo "Error: could not find powershell."; \ 79 | exit 1; \ 80 | fi \ 81 | ) 82 | 83 | .PHONY: clean 84 | clean: 85 | rm -rf _out_ 86 | -------------------------------------------------------------------------------- /installers/windows_bash/install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # A script to install our service into Program Files and ProgramData. 3 | set -x 4 | set -v 5 | set -e 6 | 7 | MyVer=X_VER_X 8 | MyAppName=sample-trace2-otel-collector 9 | MyExe="sample-trace2-otel-collector.exe" 10 | 11 | # We split the distribution into "Program Files" and "ProgramData". 12 | 13 | MyProgramFilesDir="C:/Program Files/$MyAppName" 14 | MyProgramDataDir="C:/ProgramData/$MyAppName" 15 | 16 | mkdir -p "$MyProgramFilesDir" 17 | mkdir -p "$MyProgramDataDir" 18 | 19 | cp $MyExe "$MyProgramFilesDir/" 20 | cp *.sh "$MyProgramFilesDir/" 21 | 22 | cp *.yml "$MyProgramDataDir/" 23 | -------------------------------------------------------------------------------- /installers/windows_bash/register.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # A script to register our service with the control panel service manager. 3 | set -x 4 | set -v 5 | 6 | MyVer=X_VER_X 7 | MyAppName=sample-trace2-otel-collector 8 | MyDisplayName="Sample Trace2 OpenTelemetry Collector" 9 | MyDescription="Relay Git telemetry to OpenTelemetry ${MyVer}" 10 | MyExe="sample-trace2-otel-collector.exe" 11 | 12 | # In your `config.yml`, you must set the named pipe pathname. This value 13 | # must match that. 14 | MyPipe="//./pipe/sample-trace2-otel-collector" 15 | 16 | # In your (optional) `filter.yml`, you should set a common prefix for 17 | # the nickname and ruleset keys. This wildcard must match that. 18 | MyNamespace='otel.trace2.*' 19 | 20 | # I'm going assume that you have already installed the service exe and 21 | # the various config files here: 22 | 23 | MyProgramFilesDir="C:/Program Files/$MyAppName" 24 | MyProgramDataDir="C:/ProgramData/$MyAppName" 25 | 26 | SC="C:/Windows/System32/sc.exe" 27 | 28 | # Shutdown and remove any previous version of our service. This is 29 | # mainly to help flush it from the list of services in the control 30 | # panel app. 31 | 32 | $SC stop $MyAppName 33 | $SC delete $MyAppName 34 | 35 | # Register our service. We have to name the `config.yml` file here 36 | # as part of the command line because the OTEL SVC.Start handler 37 | # only uses `os.Args` and does not look at the `Args` from the 38 | # service start dialog. 39 | # 40 | # We need to use an absolute path to the `config.yml` because the 41 | # service CWD will be in `C:/Windows/System32` when it starts. We 42 | # should likewise use absolute paths for any `pii.yml`, `filter.yml`, 43 | # and rulesets. I'm going to assume you want them in ProgramData 44 | # rather than next to the executable. 45 | # 46 | # If the any of these commands fail because of a "marked for deletion" 47 | # error from the above, make sure you don't have the control panel 48 | # services (services.msc) app open (also mmc.msc). They seem to hold 49 | # a lock on the registry data. 50 | 51 | $SC create $MyAppName \ 52 | binPath= "$MyProgramFilesDir/$MyExe --config $MyProgramDataDir/config.yml" \ 53 | displayName= "$MyDisplayName" \ 54 | start= auto || exit 1 55 | $SC description $MyAppName "$MyDescription" 56 | $SC start $MyAppName || exit 1 57 | 58 | # Tell Git to send Trace2 telemetry to us. 59 | 60 | git config --global trace2.configparams $MyNamespace 61 | git config --global trace2.eventtarget $MyPipe 62 | git config --global --list --show-origin | grep -i trace2 63 | -------------------------------------------------------------------------------- /installers/windows_bash/unregister.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # A script to unregister and remove our service from the control panel 3 | # service manager. We DO NOT delete Program Files nor ProgramData; we 4 | # are only unregistering with the system, not uninstalling it. 5 | 6 | set -x 7 | set -v 8 | 9 | MyAppName=sample-trace2-otel-collector 10 | 11 | SC="C:/Windows/System32/sc.exe" 12 | 13 | # Tell Git to stop sending Trace2 telemetry to us. 14 | git config --global --unset trace2.configparams 15 | git config --global --unset trace2.eventtarget 16 | git config --global --list --show-origin | grep -i trace2 17 | 18 | # Shutdown and remove any previous version of our service. This is 19 | # mainly to help flush it from the list of services in the control 20 | # panel app. 21 | $SC stop $MyAppName || exit 0 22 | $SC delete $MyAppName || exit 0 23 | -------------------------------------------------------------------------------- /installers/windows_batch_file/build.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | 3 | FOR /F "usebackq" %%i IN (`go env GOOS`) DO (SET GOOS=%%i) 4 | FOR /F "usebackq" %%i IN (`go env GOARCH`) DO (SET GOARCH=%%i) 5 | 6 | FOR /F "usebackq tokens=2" %%i IN (`go list -m github.com/git-ecosystem/trace2receiver`) DO (SET VER=%%i) 7 | SET "NVER=%VER:v=% 8 | 9 | SET DISTNAME=sample-trace2-otel-collector_%NVER%_%GOOS%_%GOARCH% 10 | SET DISTPATH=.\_out_\%DISTNAME% 11 | 12 | ECHO ======== Creating Layout ======== 13 | ECHO GOOS is %GOOS% 14 | ECHO GOARCH is %GOARCH% 15 | ECHO VER is %VER% 16 | ECHO NVER is %NVER% 17 | ECHO DISTNAME is %DISTNAME% 18 | 19 | IF EXIST _out_ (RMDIR /Q /S _out_ || (ECHO Could not delete previous _out_ directory & EXIT /B 1)) 20 | 21 | @ECHO ON 22 | MKDIR _out_ 23 | MKDIR %DISTPATH% 24 | 25 | XCOPY /Q ..\..\sample-trace2-otel-collector.exe %DISTPATH%\ 26 | 27 | powershell.exe -Command "(Get-Content install.bat_template).replace('X_VER_X','%VER%') | Set-Content %DISTPATH%\install.bat" 28 | powershell.exe -Command "(Get-Content register.bat_template).replace('X_VER_X','%VER%') | Set-Content %DISTPATH%\register.bat" 29 | powershell.exe -Command "(Get-Content unregister.bat_template).replace('X_VER_X','%VER%') | Set-Content %DISTPATH%\unregister.bat" 30 | 31 | XCOPY /Q ..\..\sample-configs\windows\*.yml %DISTPATH%\ 32 | 33 | @ECHO ======== Creating ZIP Package ======== 34 | 35 | powershell.exe -Command "Set-Location _out_; Compress-Archive -DestinationPath .\%DISTNAME%.zip -Path %DISTNAME%" || (ECHO Could not create ZIPFILE & EXIT /B 1) 36 | 37 | @ECHO ======== ZIP Package Created ======== 38 | @ECHO ZIPFILE created .\_out_\%DISTNAME%.zip 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /installers/windows_batch_file/install.bat_template: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | 3 | REM A script to install our OpenTelemetry collector into Program Files 4 | REM and ProgramData. Run this from an elevated command prompt. 5 | 6 | SET APPNAME=sample-trace2-otel-collector 7 | SET EXENAME=%APPNAME%.exe 8 | 9 | SET PFDIR="C:\Program Files\%APPNAME%" 10 | SET PDDIR=C:\ProgramData\%APPNAME% 11 | 12 | @ECHO ON 13 | 14 | IF NOT EXIST %PFDIR% (MKDIR %PFDIR% || (ECHO Could not create %PFDIR% & EXIT /B 1)) 15 | IF NOT EXIST %PDDIR% (MKDIR %PDDIR% || (ECHO Could not create %PDDIR% & EXIT /B 1)) 16 | 17 | XCOPY /y %EXENAME% %PFDIR%\ 18 | XCOPY /y *.bat %PFDIR%\ 19 | 20 | XCOPY /y *.yml %PDDIR%\ 21 | -------------------------------------------------------------------------------- /installers/windows_batch_file/register.bat_template: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | 3 | REM A script to register our OpenTelemetry collector with the control 4 | REM panel service manager. Run this from an elevated command prompt. 5 | 6 | REM **************************************************************** 7 | REM X_*_X tokens in this template will be replaced by "build.bat". 8 | REM 9 | 10 | SET VER=X_VER_X 11 | 12 | REM **************************************************************** 13 | 14 | SET APPNAME=sample-trace2-otel-collector 15 | SET EXENAME=%APPNAME%.exe 16 | 17 | SET DISPLAY="Sample Trace2 OpenTelemetry Collector" 18 | SET DESCRIPTION="Relay Git telemetry to OpenTelemetry %VER%" 19 | 20 | REM In your config.yml, you must set the named pipe pathname. The value 21 | REM here must match that. 22 | SET PIPE=\\.\pipe\%APPNAME% 23 | 24 | REM In your (optional) filter.yml, you should set a common prefix for 25 | REM the nickname and ruleset keys. This wildcard must match that. 26 | SET NAMESPACE=otel.trace2.* 27 | 28 | SET SC=C:\Windows\System32\sc.exe 29 | 30 | REM I'm going to assume that you have already installed the service and 31 | REM various YML config files in these directories: 32 | 33 | SET PFDIR="C:\Program Files\%APPNAME%" 34 | SET PDDIR=C:\ProgramData\%APPNAME% 35 | 36 | REM We have to put the collector's command line arguments into the binpath 37 | REM because the OTEL SVC.Start handler only uses "os.Args" and does not 38 | REM look at the args from the service manager start dialog. And we need 39 | REM to do it here to get the quoting correct because of the space in 40 | REM "Program Files". 41 | REM 42 | REM We also need to use an absolute path to the config.yml file because 43 | REM the service will be started in C:\Windows\System32 and it will not chdir(). 44 | REM Likewise, we should use absolute paths for pii.yml, filter.yml, and any 45 | REM rulesets. 46 | SET BINPATH="C:\Program Files\%APPNAME%\%EXENAME% --config %PDDIR%\config.yml" 47 | 48 | REM Shutdown and remove any previous version of our service. This is mainly 49 | REM to help flush it fro the list of services in the contorl panel. Add a 50 | REM small timeout to avoid STOP_PENDING state. 51 | 52 | @ECHO ON 53 | %SC% query %APPNAME% >NUL && (ECHO Stopping previous version) 54 | %SC% query %APPNAME% >NUL && (%SC% stop %APPNAME%; TIMEOUT /T 10) 55 | %SC% query %APPNAME% >NUL && (%SC% delete %APPNAME%) 56 | @ECHO OFF 57 | 58 | REM Register our collector with the service manager in control panel. 59 | REM 60 | REM If any of these commands fail because of a "marked for deletion" error 61 | REM from the above, make sure that you don't have the control panel services 62 | REM (services.msc) application open (or mmc.msc). They seem to hold a lock 63 | REM on the registry data. 64 | 65 | @ECHO ON 66 | %SC% create %APPNAME% binPath= %BINPATH% obj= "NT AUTHORITY\Local Service" displayName= %DISPLAY% start= auto || (ECHO Could not register collector & EXIT /B 1) 67 | %SC% description %APPNAME% %DESCRIPTION% || (ECHO Could not set collector description & EXIT /B 1) 68 | %SC% start %APPNAME% || (ECHO Could not start collector & EXIT /B 1) 69 | @ECHO OFF 70 | 71 | REM Tell git.exe to send Trace2 telemetry to our collector. 72 | REM Use "--global" scope which refers to ".gitconfig" in your home directory 73 | REM across all versions of Git. (The location of the "--system" config 74 | REM file varies between distributions.) 75 | REM 76 | 77 | @ECHO ON 78 | git config --global trace2.configparams %NAMESPACE% 79 | git config --global trace2.eventtarget %PIPE% 80 | 81 | git config --global --list --show-origin | findstr trace2 82 | 83 | -------------------------------------------------------------------------------- /installers/windows_batch_file/unregister.bat_template: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | 3 | REM A script to unregister our OpenTelemetry collector from the control 4 | REM panel service manager. REM Run this from an elevated command prompt. 5 | REM 6 | REM We DO NOT delete Program File nor ProgramData. We are only unregistering 7 | REM it, not uninstalling it. 8 | 9 | SET APPNAME=sample-trace2-otel-collector 10 | 11 | SET SC=C:\Windows\System32\sc.exe 12 | 13 | REM Tell Git to stop sending Trace2 telemetry to us. 14 | 15 | @ECHO ON 16 | git config --global --unset trace2.configparams 17 | git config --global --unset trace2.eventtarget 18 | git config --global --list --show-origin | findstr trace2 19 | @ECHO OFF 20 | 21 | REM Shutdown and remove our service from the control panel. 22 | REM Sleep for a few seconds after we stop the service and before 23 | REM we delete it, to avoid errors when it is in STOP_PENDING state. 24 | 25 | @ECHO ON 26 | %SC% query %APPNAME% >NUL && (%SC% stop %APPNAME%) 27 | TIMEOUT /T 10 28 | %SC% query %APPNAME% >NUL && (%SC% delete %APPNAME%) 29 | -------------------------------------------------------------------------------- /main.go: -------------------------------------------------------------------------------- 1 | // Code generated by "go.opentelemetry.io/collector/cmd/builder". DO NOT EDIT. 2 | 3 | // Program sample-trace2-otel-collector is an OpenTelemetry Collector binary. 4 | package main 5 | 6 | import ( 7 | "log" 8 | 9 | "go.opentelemetry.io/collector/component" 10 | "go.opentelemetry.io/collector/otelcol" 11 | ) 12 | 13 | func main() { 14 | info := component.BuildInfo{ 15 | Command: "sample-trace2-otel-collector", 16 | Description: "Custom OTEL Collector to convert and relay Git Trace2 data to OTLP", 17 | Version: "0.0.0", 18 | } 19 | 20 | if err := run(otelcol.CollectorSettings{BuildInfo: info, Factories: components}); err != nil { 21 | log.Fatal(err) 22 | } 23 | } 24 | 25 | func runInteractive(params otelcol.CollectorSettings) error { 26 | cmd := otelcol.NewCommand(params) 27 | if err := cmd.Execute(); err != nil { 28 | log.Fatalf("collector server run finished with error: %v", err) 29 | } 30 | 31 | return nil 32 | } 33 | -------------------------------------------------------------------------------- /main_others.go: -------------------------------------------------------------------------------- 1 | // Code generated by "go.opentelemetry.io/collector/cmd/builder". DO NOT EDIT. 2 | 3 | //go:build !windows 4 | 5 | package main 6 | 7 | import "go.opentelemetry.io/collector/otelcol" 8 | 9 | func run(params otelcol.CollectorSettings) error { 10 | return runInteractive(params) 11 | } 12 | -------------------------------------------------------------------------------- /main_windows.go: -------------------------------------------------------------------------------- 1 | // Code generated by "go.opentelemetry.io/collector/cmd/builder". DO NOT EDIT. 2 | 3 | //go:build windows 4 | 5 | package main 6 | 7 | import ( 8 | "errors" 9 | "fmt" 10 | "golang.org/x/sys/windows" 11 | "golang.org/x/sys/windows/svc" 12 | "go.opentelemetry.io/collector/otelcol" 13 | ) 14 | 15 | func run(params otelcol.CollectorSettings) error { 16 | // No need to supply service name when startup is invoked through 17 | // the Service Control Manager directly. 18 | if err := svc.Run("", otelcol.NewSvcHandler(params)); err != nil { 19 | if errors.Is(err, windows.ERROR_FAILED_SERVICE_CONTROLLER_CONNECT) { 20 | // Per https://learn.microsoft.com/en-us/windows/win32/api/winsvc/nf-winsvc-startservicectrldispatchera#return-value 21 | // this means that the process is not running as a service, so run interactively. 22 | return runInteractive(params) 23 | } 24 | 25 | return fmt.Errorf("failed to start collector server: %w", err) 26 | } 27 | 28 | return nil 29 | } 30 | -------------------------------------------------------------------------------- /sample-configs/unix/config.yml: -------------------------------------------------------------------------------- 1 | # A sample config.yml file for Linux and macOS. 2 | # 3 | # All pathnames should be absolute to your intended installation 4 | # directory because we don't want to assume a CWD when the service 5 | # is run from `systemd(1)` or `launchctl(1)`. 6 | 7 | receivers: 8 | trace2receiver: 9 | socket: "/usr/local/sample-trace2-otel-collector/trace2.socket" 10 | # filter: "/usr/local/sample-trace2-otel-collector/filter.yml" 11 | # pii: "/usr/local/sample-trace2-otel-collector/pii.yml" 12 | 13 | processors: 14 | 15 | exporters: 16 | logging: 17 | verbosity: normal # basic, normal, detailed 18 | 19 | service: 20 | telemetry: 21 | metrics: 22 | level: none # disable default prometheus metrics on http://localhost:8888/metrics 23 | logs: 24 | level: "INFO" # "INFO", "DEBUG" 25 | pipelines: 26 | traces: 27 | receivers: [trace2receiver] 28 | processors: [] 29 | exporters: [logging] 30 | 31 | -------------------------------------------------------------------------------- /sample-configs/windows/config.yml: -------------------------------------------------------------------------------- 1 | # A sample config.yml file for Windows. 2 | # 3 | # All pathnames should be absolute to your intended installation 4 | # and data directory because we don't want to assume a CWD when the 5 | # service is started by the Service Manager in Control Panel. 6 | # 7 | # However, the "pipe" pathanme must always have the "//./pipe/" prefix. 8 | 9 | receivers: 10 | trace2receiver: 11 | pipe: "//./pipe/sample-trace2-otel-collector" 12 | # filter: "C:/ProgramData/sample-trace2-otel-collector/filter.yml" 13 | # pii: "C:/ProgramData/sample-trace2-otel-collector/pii.yml" 14 | 15 | processors: 16 | 17 | exporters: 18 | logging: 19 | verbosity: normal # basic, normal, detailed 20 | 21 | service: 22 | telemetry: 23 | metrics: 24 | level: none # disable default prometheus metrics on http://localhost:8888/metrics 25 | logs: 26 | level: "INFO" # "INFO", "DEBUG" 27 | pipelines: 28 | traces: 29 | receivers: [trace2receiver] 30 | processors: [] 31 | exporters: [logging] 32 | 33 | --------------------------------------------------------------------------------