package
module
Version:
v0.0.0-...-d42a738
Opens a new window with list of versions in this module.
Published: Nov 8, 2024
License: MIT
Opens a new window with license information.
Imports: 25
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
opentelemetry-github-actions-annotations-receiver
Local Development
Prerequisites
Ngrok
The Ngrok can be installed by running:
make install-ngrok
ocb
The OpenTelemetry Collector Builder (OCB) can be installed by running:
make install-ocb
Build the collector
make build
Open one terminal and run
make ngrok
Copy the ngrok
URL and go to your GitHub repository, in this case we use elastic/oblt-project-tmpl
:
- https://github.com/elastic/oblt-project-tmpl/settings/hooks
- Payload:
https://3012-37-133-56-13.ngrok-free.app/githubactionsannotations
or the relevant ngrok
URL
- Content type:
application/json
- Secret:
secret
- fixed for now for testing purposes
Enable SSL verification
- Individual events:
- Workflow runs
- Workflow jobs
Run the collector
make run
Documentation
¶
NewFactory creates a factory for githubactionsannotationsreceiver.
type Config struct {
confighttp.ServerConfig `mapstructure:",squash"`
Path string `mapstructure:"path"`
WebhookSecret configopaque.String `mapstructure:"webhook_secret"`
GitHubAuth GitHubAuth `mapstructure:"github_auth"`
Retry RetryConfig `mapstructure:"retry"`
BatchSize int `mapstructure:"batch_size"`
CustomServiceName string `mapstructure:"custom_service_name"`
ServiceNamePrefix string `mapstructure:"service_name_prefix"`
ServiceNameSuffix string `mapstructure:"service_name_suffix"`
}
Validate checks if the receiver configuration is valid
type GitHubAuth struct {
AppID int64 `mapstructure:"app_id"`
InstallationID int64 `mapstructure:"installation_id"`
PrivateKey configopaque.String `mapstructure:"private_key"`
PrivateKeyPath string `mapstructure:"private_key_path"`
Token configopaque.String `mapstructure:"token"`
}
type RetryConfig struct {
InitialInterval time.Duration `mapstructure:"initial_interval"`
MaxInterval time.Duration `mapstructure:"max_interval"`
MaxElapsedTime time.Duration `mapstructure:"max_elapsed_time"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.