Skip to content

Latest commit

 

History

History
61 lines (42 loc) · 3.08 KB

File metadata and controls

61 lines (42 loc) · 3.08 KB

Digma - OpenTelemetry Spring Auto-Configuration

It extends and relies on the OpenTelemetry Spring Boot Auto Configuration

Quickstart

Add these dependencies to your project.

Replace DIGMA_INSTRUMENTATION_VERSION with the latest stable release.

  • Minimum version: 0.0.8

For Gradle add to your dependencies:

//digma opentelemetry common auto-configuration
implementation("com.digma:digma-otel-instr-common:DIGMA_INSTRUMENTATION_VERSION")
//digma opentelemetry spring boot auto-configuration
implementation("com.digma:digma-otel-instr-spring-boot:DIGMA_INSTRUMENTATION_VERSION")

Features

Digma OpenTelemetry Auto Configuration

Digma Spring Web MVC Auto Configuration

This feature relies on the existing auto configuration for Spring WebMVC controllers This feature autoconfigures extra instrumentation for Spring WebMVC controllers by using spring-aop to wrap methods annotated with @GetMapping, @PostMapping on controllers classes (annotated with @Controller). It will add the following attributes to existing span: code.function code.namespace

Spring Support

Auto-configuration is natively supported by Springboot applications. To enable these features in "vanilla" use @EnableDigmaForSpringBoot to complete a component scan of this package.

Usage
import io.opentelemetry.instrumentation.spring.autoconfigure.EnableOpenTelemetry;
import org.springframework.context.annotation.Configuration;

@Configuration
@EnableDigmaForSpringBoot
public class OpenTelemetryConfig {
}

Configuration Properties

Resource Properties
Feature Property Default Value Comments
Resource digma.otel.springboot.resource.enabled true
digma.otel.springboot.resource.environment `` digma environment, value for example: PRODCTION, CI, QA. it overrides the value of expected environment variable named DEPLOYMENT_ENV. leave it empty if its the developer environment (by default it will take the hostname)