Skip to main content

Configuring OpenTelemetry for your instance

Learn how to configure OpenTelemetry metrics collection on your GitHub Enterprise Server instance for enhanced monitoring and observability.

OpenTelemetry metrics are the future foundation for monitoring, available from GitHub Enterprise Server 3.18 onward. This new monitoring stack provides enhanced observability and management capabilities compared to the legacy collectd system.

Collectd metrics continue to be gathered by default and remain fully supported in this release.

Observação

OpenTelemetry metrics are in versão prévia pública and subject to change. We would love to hear your feedback on the preview. You can share it with your customer success team, or leave a comment in the community discussion post.

Prerequisites

  • GitHub Enterprise Server 3.18 or later
  • Administrative access to the Console de Gerenciamento
  • SSH access to your GitHub Enterprise Server appliance

Enabling OpenTelemetry metrics

OpenTelemetry metrics are disabled by default. You can enable them through the Console de Gerenciamento or command line.

Using the Console de Gerenciamento

  1. Em uma conta administrativa no GitHub Enterprise Server, no canto superior direito de qualquer página, clique em .

  2. Se você ainda não estiver na página "Administração do site", no canto superior esquerdo, clique em Administração do site.

  3. Na barra lateral " Site admin", clique em Console de Gerenciamento.

  4. In the monitoring settings, select Enable OpenTelemetry.

  5. Na barra lateral "Configurações", clique em Salvar configurações.

    Observação

    Se você salvar as configurações no Console de Gerenciamento, isso reiniciará os serviços do sistema, o que poderá resultar em tempo de inatividade visível pelo usuário.

  6. Aguarde a conclusão da execução de suas configurações.

Using the command line

  1. Conecte-se via SSH ao sua instância do GitHub Enterprise Server. Se sua instância for composta por vários nós, por exemplo, se a alta disponibilidade ou a replicação geográfica estiver configurada, efetue SSH no nó primário. Se você usar um cluster, poderá efetuar SSH em qualquer nó. Substitua HOSTNAME pelo nome do host da instância ou pelo nome do host ou endereço IP de um nó. Para saber mais, confira Acesar o shell administrativo (SSH).

    Shell
    ssh -p 122 admin@HOSTNAME
    
  2. Run the following command to enable OpenTelemetry metrics.

    ghe-config observability.metrics.next-enabled true
    
  3. Para aplicar a configuração, execute o comando a seguir.

    Observação

    Durante uma execução de configuração, os serviços do sua instância do GitHub Enterprise Server podem ser reiniciados, o que pode causar um breve tempo de inatividade para os usuários.

    Shell
    ghe-config-apply
    
  4. Aguarde a conclusão da execução de suas configurações.

Performance considerations

When configuring OpenTelemetry metrics, consider the following performance factors:

  • Collection frequency: More frequent collection increases system load
  • Data retention: Longer retention periods require more storage
  • Custom exporters: Additional exporters may increase CPU and memory usage
  • Network bandwidth: External metric shipping affects network usage

Configuring metrics collection

After enabling OpenTelemetry metrics, you can customize various aspects of the metrics collection process.

Setting collection intervals

The default metrics collection interval is 30 seconds. You can adjust this based on your monitoring needs.

Importante

Setting shorter intervals increases the precision of metrics but also increases storage requirements and system load. Consider your system resources and monitoring requirements before adjusting this setting.

Using the Console de Gerenciamento to set intervals

  1. Em uma conta administrativa no GitHub Enterprise Server, no canto superior direito de qualquer página, clique em .

  2. Se você ainda não estiver na página "Administração do site", no canto superior esquerdo, clique em Administração do site.

  3. Na barra lateral " Site admin", clique em Console de Gerenciamento.

  4. In the monitoring settings, under Metrics scrape interval, enter the desired interval in seconds (for example, 60).

  5. Na barra lateral "Configurações", clique em Salvar configurações.

    Observação

    Se você salvar as configurações no Console de Gerenciamento, isso reiniciará os serviços do sistema, o que poderá resultar em tempo de inatividade visível pelo usuário.

  6. Aguarde a conclusão da execução de suas configurações.

Using the command line to set intervals

SSH into your GitHub Enterprise Server appliance and run the following commands:

# Set scrape interval to 60 seconds
ghe-config observability.metrics.interval 60
ghe-config-apply

Configuring data retention

By default, metrics data is retained for 30 days. You can modify this setting using either the Console de Gerenciamento or command line.

Using the Console de Gerenciamento to configure retention

  1. Em uma conta administrativa no GitHub Enterprise Server, no canto superior direito de qualquer página, clique em .

  2. Se você ainda não estiver na página "Administração do site", no canto superior esquerdo, clique em Administração do site.

  3. Na barra lateral " Site admin", clique em Console de Gerenciamento.

  4. In the monitoring settings, under Metrics retention, enter the desired retention period in days (for example, 15).

  5. Na barra lateral "Configurações", clique em Salvar configurações.

    Observação

    Se você salvar as configurações no Console de Gerenciamento, isso reiniciará os serviços do sistema, o que poderá resultar em tempo de inatividade visível pelo usuário.

  6. Aguarde a conclusão da execução de suas configurações.

Using the command line to configure retention

SSH into your GitHub Enterprise Server appliance and run the following commands:

# Set retention to 15 days
ghe-config observability.metrics.retention 15
ghe-config-apply

Configuring the verbosity level for internal telemetry

The OpenTelemetry collector generates its own internal telemetry data for monitoring the health and performance of the collector itself. You can configure the verbosity of this internal telemetry using the command line.

The available telemetry levels are:

  • none: Disables internal telemetry
  • basic: Provides essential telemetry data (default)
  • normal: Provides standard telemetry data
  • detailed: Provides verbose telemetry data for debugging

SSH into your GitHub Enterprise Server appliance and run the following commands:

# Set internal telemetry level to normal
ghe-config observability.metrics.internal-otel-telemetry-level normal
ghe-config-apply

Observação

Higher telemetry levels provide more detailed information about the collector's internal operations but also increase resource usage. The basic level is recommended for production environments unless you need to troubleshoot collector issues.

Troubleshooting configuration issues

If you encounter problems with OpenTelemetry configuration, the following information can help you identify and resolve common issues.

Common configuration problems

  • Service startup failures: Check system logs for error messages
  • Resource constraints: Monitor system resources when adjusting collection intervals

Viewing local logs

SSH into the node you want to debug and run the following commands:

View OpenTelemetry collector logs:

sudo journalctl -u otelcol-contrib -f

View VictoriaMetrics logs:

sudo journalctl -u victoriametrics -f

Next steps