Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

README.md

Android Log Instrumentation

Status: development

The Android Log instrumentation transforms calls to android.util.Log.x to emit OTel log record.

Telemetry

This instrumentation produces the following telemetry:

Log

  • Type: Log
  • Description: A log message
  • Attributes:
    • android.log.tag: The tag passed to android.uti.Log.x
    • exception.stacktrace - Optional. See the (semconv here).
    • exception.type - Optional. See the (semconv here)

Installation

Applying the Byte Buddy plugin

This instrumentation makes use of Byte Buddy to do bytecode instrumentation. Because of this, you need to ensure that your application has the Byte Buddy plugin applied, as shown below.

plugins {
  id("net.bytebuddy.byte-buddy-gradle-plugin") version "LATEST_VERSION" // <1>
}
  1. You can find the latest version here.

Adding dependencies

implementation("io.opentelemetry.android.instrumentation:android-log-library:1.6.0-alpha")
byteBuddy("io.opentelemetry.android.instrumentation:android-log-agent:1.6.0-alpha") // <2>