Support auto-instrumentation

Created on 14 March 2023, over 1 year ago
Updated 22 January 2024, 5 months ago

Problem/Motivation

There is now auto-instrumentation support for opentelemetry https://github.com/open-telemetry/opentelemetry-php-instrumentation

This makes it possible to add instrumentation hooks around core module code without having to add SDK code directly to Drupal core.

This module can provide generic hook implementations that would work on all Drupal sites.

Examples of what we can do:

  • DrupalKernel
  • Cache bins
  • KeyValue store
  • Renderer
  • Guzzle Client (?)
  • PDO layer

Basically enough useful information for tracing a typical Drupal app. Users can add their own custom tracing via custom modules.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

✨ Feature request
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡¦πŸ‡ΊAustralia kim.pepper πŸ„β€β™‚οΈπŸ‡¦πŸ‡ΊSydney, Australia

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @kim.pepper
  • Status changed to Needs work about 1 year ago
  • πŸ‡¦πŸ‡²Armenia Murz Yerevan, Armenia

    I've implemented a dummy plugin here https://git.drupalcode.org/project/opentelemetry/-/blob/1.0.x/src/Plugin... that just checks the requirements for now.
    The next step is to make it do the real work with auto-instrumentation.

  • First commit to issue fork.
  • πŸ‡³πŸ‡±Netherlands euphoric_mv

    Hello @Murz.

    I am currently implementing auto-instrumentation on one of our projects, it works fine, so I would like to create a fork and push it next week. I will push it without tests, so you can have just a picture of how it works. Once we agree on an approach, I will add some tests.

  • πŸ‡¦πŸ‡²Armenia Murz Yerevan, Armenia

    Good to know, thank you, will wait for your contribution to review! Wanted to do it by myself, but still very busy at work and have no time.

  • Hi @euphoric_mv, @Murz,

    Can you please let me know the implementation of Auto instrumentation with drupal 10, php 8.1.

    I have already enabled opentelemetry extension, what else is required for enabling auto instrumentation.

    Thanks!

  • πŸ‡³πŸ‡±Netherlands euphoric_mv

    Hi @sudhanjs

    Thank you for the reminder. I am working on a porting solution that I implemented in the project in this a contrib module. I will create PR and let you know guys to review it.

  • πŸ‡³πŸ‡±Netherlands euphoric_mv

    I'm trying to fork the project, but no success. Does anyone has the same problem?

  • Status changed to Active 5 months ago
  • πŸ‡¦πŸ‡²Armenia Murz Yerevan, Armenia

    In other issues, I see other folks have no problem with forking.
    @euphoric_mv, could you please describe more details about your problems with forking?

Production build 0.69.0 2024