Categorygithub.com/git-ecosystem/trace2receiver
modulepackage
0.5.6
Repository: https://github.com/git-ecosystem/trace2receiver.git
Documentation: pkg.go.dev

# README

Trace2 Receiver

The trace2receiver project is a trace receiver component library for an OpenTelemetry Custom Collector daemon. It receives Git Trace2 telemetry from local Git commands, translates it into an OpenTelemetry format, and forwards it to other OpenTelemetry components.

This component is useful it you want to collect performance data for Git commands, aggregate data from multiple users to create performance dashboards, build distributed traces of nested Git commands, or understand how the size and shape of your Git repositories affect command performance.

Background

This project is a GOLANG static library component that must be linked into an OpenTelemetry Custom Collector along with other pipeline and exporter components to process and forward the telemetry data to a data store, such as Azure Monitor or another OTLP aware cloud provider.

Setup and configuration details are provided in the Docs.

The sample-trace2-otel-collector peer repository contains a pre-built open source sample collector to help you get started. See the README for more details.

Contributions

This project is under active development, and loves contributions from the community. Check out the CONTRIBUTING guide for details on getting started.

Requirements

This project is written in GOLANG and uses OpenTelemetry libraries and tools. See the OpenTelemetry documentation for more information.

This project runs on Linux, macOS, and Windows.

License

This project is licensed under the terms of the MIT open source license. Please refer to LICENSE for the full terms.

Maintainers

See CODEOWNERS for a list of current project maintainers.

Support

See SUPPORT for instructions on how to file bugs, make feature requests, or seek help.

# Functions

Is this Git command a `git fsmonitor--daemon` command? Check in `apply__cmd_name()` since we know FSMonitor sends a valid `cmd_name` event.
NewFactory creates a factory for trace2 receiver.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Constants

All detail level names have leading "dl:" to help avoid cycles when resolving a custom ruleset name.
No description provided by the author
All detail level names have leading "dl:" to help avoid cycles when resolving a custom ruleset name.
No description provided by the author
All detail level names have leading "dl:" to help avoid cycles when resolving a custom ruleset name.
No description provided by the author
All detail level names have leading "dl:" to help avoid cycles when resolving a custom ruleset name.
No description provided by the author
No description provided by the author
All detail level names have leading "dl:" to help avoid cycles when resolving a custom ruleset name.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Optional process hierarchy that invoked this Git command.
The complete command line args of the process.
The format string of one error message from the command.
No description provided by the author
The command's exit code.
The verb hierarchy for the command as reported by Git itself.
The base filename of the process executable (with the pathname and `.exe` suffix stripped off), for example `git` or `git-remote-https`.
The executable name and verb isolated from the command line with normalized formatting.
The executable name, verb and command mode combined with normalized formatting.
The Trace2 SID of the process.
The version string of the process executable as reported in the Trace2 "version" event.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Value of the `instrumentation.name` or `instrumentationlibrary.name` key that we inject into the resourceAttributes.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Value of the `service.namespace` key that we inject into all resourceAttributes.
Trace2 classification of the span.
No description provided by the author
No description provided by the author

# Variables

No description provided by the author
No description provided by the author

# Structs

`Config` represents the complete configuration settings for an individual receiver declaration from the `config.yaml`.
FilterDefaults defines default filtering values.
FilterKeynames defines the names of the Git config settings that will be used in `def_param` events to send repository/worktree data to us.
FilterSettings describes how we should filter the OTLP output that we generate.
No description provided by the author
Settings to enable/disable possibly GDPR-sensitive fields in the telemetry output.
No description provided by the author
No description provided by the author
`Rcvr_UnixSocket` implements the `component.TracesReceiver` (aka `component.Receiver` (aka `component.Component`)) interface.
No description provided by the author
RulesetDefaults defines default values for this custom ruleset.
RulesetDefinition captures the content of a custom ruleset YML file.
No description provided by the author
No description provided by the author
The `TrChild` structure captures the lifetime of a child process spawned by the current Git process.
No description provided by the author
Event fields only present in an "event":"alias" event.
Event fields only present in an "event":"exit" or "event":"atexit" event.
Event fields only present in an "event":"child_exit" event.
Event fields only present in an "event":"child_ready" event.
Event fields only present in an "event":"child_start" event.
Event fields only present in an "event":"ancestry" event.
Event fields only present in an "event":"cmd_mode" event.
Event fields only present in an "event":"cmd_name" event.
Event fields only present in an "event":"cmd_path" event.
Event fields only present in "event":"counter" and "event":"th_counter" events.
Event fields only present in an "event":"def_param" event.
Event fields only present in an "event":"def_repo" event.
Event fields only present in an "event":"error" event.
Event fields only present in an "event":"exec" event.
Event fields only present in an "event":"exec_result" event.
Event fields only present in a "data" or "data_json" event.
Event fields only present in an "event":"region_enter" event.
Event fields only present in an "event":"region_leave" event.
Event fields only present in an "event":"signal" event.
Event fields only present in an "event":"start" event.
Event fields only present in an "event":"thread_exit" event.
Event fields only present in an "event":"thread_start" event.
Event fields only present in an "event":"timer" or "event":"th_timer" events.
Event fields only present in an "event":"version" event.
No description provided by the author
Data associated with the entire process.
No description provided by the author
`TrSpanEssentials` is a generic term to describe a chunk of time doing something.
No description provided by the author
The `TrThread` structure captures the lifetime of a thread.

# Interfaces

No description provided by the author

# Type aliases

No description provided by the author
No description provided by the author
FilterDetailLevel describes the amount of detail in the output OTLP that we will generate for a Git command.
FilterNicknames is used to map a repo nickname to the name of the ruleset or detail-level that should be used.
FilterRulesets is used to map a custom ruleset name to the pathname of the associated YML file.
No description provided by the author
No description provided by the author
No description provided by the author
RulesetCommands is used to map a Git command to a detail level.