This documentation has an index for AI agents at /llms.txt. A Markdown version of this page is available at https://explorer.opentelemetry.io/java-agent/instrumentation/hibernate-6.0.md.

Hibernate

OpenTelemetry Java agent instrumentation

This instrumentation enables spans for Hibernate ORM operations.

  • Name: hibernate-6.0
  • Scope: io.opentelemetry.hibernate-6.0
  • Target versions: org.hibernate.orm:hibernate-core:[6.0.0.Final,)
  • Library: https://hibernate.org/

Telemetry

When default

Spans

Span kindAttributes
INTERNAL

When otel.instrumentation.hibernate.experimental-span-attributes=true

Spans

Span kindAttributes
INTERNALhibernate.session_id (STRING)

Configuration

OptionTypeDefaultDescription
java.common.database.statement_sanitizer.enabledbooleantrueDeprecated: use java.common.db.query_sanitization.enabled instead. It is ignored under v3 preview.
otel.instrumentation.common.db-statement-sanitizer.enabledbooleantrueDeprecated: use otel.instrumentation.common.db.query-sanitization.enabled instead. It is ignored under v3 preview and will be removed in 3.0.
otel.instrumentation.common.db.query-sanitization.enabledbooleantrueEnables query sanitization for database queries.
otel.instrumentation.hibernate.experimental-span-attributesbooleanfalseEnables the experimental hibernate.session_id span attribute.
otel.instrumentation.hibernate.query-sanitization.enabledbooleanEnables query sanitization for Hibernate queries. Overrides otel.instrumentation.common.db.query-sanitization.enabled for this instrumentation; when unset, that setting applies.
otel.instrumentation.hibernate.statement-sanitizer.enabledbooleanDeprecated: use otel.instrumentation.hibernate.query-sanitization.enabled instead. It is ignored under v3 preview and will be removed in 3.0. When unset, this setting falls back to otel.instrumentation.common.db.query-sanitization.enabled (including its deprecated aliases).

Data

  • JSON (latest): /data/javaagent/instrumentations/hibernate-6.0/latest.json
  • JSON (pinned): /data/javaagent/instrumentations/hibernate-6.0/hibernate-6.0-4430210724c8.json
  • Explore: /java-agent/instrumentation/hibernate-6.0