Skip to content

LLMObs retrieval and embedding span creation methods are not static #9372

@ClintAtEsper

Description

@ClintAtEsper

Tracer Version(s)

1.52.1

Java Version(s)

21.0.8

JVM Vendor

Eclipse Adoptium / Temurin

Bug Report

The most recent PR to add the retrieval and embeddings span types for LLM Observability did not make the span creation methods static like the other span creation methods - LLMObs.startWorkflowSpan, etc.

Expected Behavior

LLMObs.startRetrievalSpan and LLMObs.startEmbeddingSpan are available without needing to manually attempt to instantiate the LLMObs class.

Reproduction Code

This won't compile unless you comment out the retrieval span.

import datadog.trace.api.llmobs.LLMObs;
import datadog.trace.api.llmobs.LLMObsSpan;

public class Obs {
   public void main (String[] args) {

     LLMObsSpan llmWorkflowSpan = LLMObs.startWorkflowSpan("main", "test-app", null);
     LLMObsSpan llmRetrievalSpan = LLMObs.startRetrievalSpan("main", "test-app", null);

  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: bugBug report and fix

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions