Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/baronfel/msbuild-otel-exporter
A CLI exporter for emitting MSBuild structured logs as OpenTelemetry spans
https://github.com/baronfel/msbuild-otel-exporter
Last synced: 29 days ago
JSON representation
A CLI exporter for emitting MSBuild structured logs as OpenTelemetry spans
- Host: GitHub
- URL: https://github.com/baronfel/msbuild-otel-exporter
- Owner: baronfel
- Created: 2022-01-30T21:40:16.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-04-13T13:13:08.000Z (over 2 years ago)
- Last Synced: 2024-10-06T15:22:05.564Z (about 1 month ago)
- Language: F#
- Size: 18.6 KB
- Stars: 12
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# MSBuild Structured Log exporter for OpenTelemetry
## Table of Contents
- [About](#about)
- [Getting Started](#getting-started)
- [Usage](#usage)
- [Contributing](../CONTRIBUTING.md)## About
This project provides an library for parsing MSBuild Structured logs, as well as a dotnet tool for performing that same task.
## Getting Started
### Prerequisites
You'll need the dotnet SDK version 6.0 or greater installed to run the dotnet tool.
### Installing
Install the tool with `dotnet tool install msbuild.otel.harness` (NAME TBD)
## Usage
See the `--help` output for details, but the gist is that you can specify any of 3 exporters:
* `--console`, to emit spans to stdout
* `--zipkin-endpoint `, to emit spans to a zipkin instance, or
* `--oltp-endpoint `, to emit spans to an OLTP-compatible instance
* `--oltp-header `, to emit additional headers to an OLTP-compatible instance (for example authentication headers)Full Help:
```
Description:
Translates MSBuild structured log files to OpenTelemetry spans.Usage:
msbuild.otel.harness [options]Arguments:
The MSBuild structured log file to parseOptions:
--serviceName The OpenTelemetry service name to use for the spans. [default: msbuild]
--console Log the emitted spans to the console
--oltp-endpoint The OpenTelemetry endpoint to use for the spans.
--oltp-header Allows for adding arbitrary headers in a key=value format. Use this option multiple times for multiple header values.
--zipkin-endpoint The Zipkin endpoint to use for the spans.
-?, -h, --help Show help and usage information
```### Zipkin Endpoint
To upload to zipkin you'll need to use the full url, for example: `http://localhost:9411/api/v2/spans`
```bash
dotnet msbsl-otel msbuild.binlog --zipkin-endpoint http://localhost:9411/api/v2/spans
```