Skip to content

add APIs for llm obs sdk - #8135

Merged
gary-huang merged 4 commits into
gary/llmobs-sdk-mergefrom
gary/add-llm-obs-api
May 7, 2025
Merged

add APIs for llm obs sdk#8135
gary-huang merged 4 commits into
gary/llmobs-sdk-mergefrom
gary/add-llm-obs-api

Conversation

@gary-huang

@gary-huanggary-huang commented Dec 30, 2024

Copy link
Copy Markdown
Contributor

What Does This Do

Add APIs for LLM obs SDK manual instrumentation

Starting spans

LLMObsSpanspan = LLMObs.startLLMSpan(StringspanName, StringmodelName, StringmodelProvider, @NullableStringmlApp, @NullableStringsessionID)
LLMObsSpanspan = LLMObs.startAgentSpan(StringspanName, @NullableStringmlApp, @NullableStringsessionID)
LLMObsSpanspan = LLMObs.startToolSpan(StringspanName, @NullableStringmlApp, @NullableStringsessionID)
LLMObsSpanspan = LLMObs.startTaskSpan(StringspanName, @NullableStringmlApp, @NullableStringsessionID)
LLMObsSpanspan = LLMObs.startWorkflowSpan(StringspanName, @NullableStringmlApp, @NullableStringsessionID)

Interacting with spans

span.annotateIO(List<Map<String, Object>> inputData, List<Map<String, Object>> outputData)
span.annotateIO(StringinputData, StringoutputData)
span.setMetadata(Map<String, Object> metadata)
span.setMetrics(Map<String, Number> metrics)
span.setMetric(CharSequencekey, intvalue)
setMetric(CharSequencekey, longvalue)
setMetric(CharSequencekey, doublevalue)
span.setTags(Map<String, Object> tags)
span.setTag(Stringkey, Stringvalue)
span.setTag(Stringkey, booleanvalue)
span.setTag(Stringkey, intvalue)
span.setTag(Stringkey, longvalue)
span.setTag(Stringkey, doublevalue)
span.setError(booleanerror)
span.setErrorMessage(StringerrorMessage)
span.addThrowable(Throwablethrowable)
span.finish()

A sample spring controller using the APIs above

packagecom.example.restservice;
importdatadog.trace.api.appsec.LoginEventCallback;
importdatadog.trace.api.civisibility.telemetry.tag.AgentlessLogSubmissionEnabled;
importjava.lang.management.ManagementFactory;
importjava.util.ArrayList;
importjava.util.HashMap;
importjava.util.List;
importjava.util.concurrent.atomic.AtomicLong;
importorg.slf4j.Logger;
importorg.slf4j.LoggerFactory;
importorg.springframework.web.bind.annotation.GetMapping;
importorg.springframework.web.bind.annotation.RequestParam;
importorg.springframework.web.bind.annotation.RestController;
importdatadog.trace.api.llmobs.LLMObs;
@RestControllerpublicclassGreetingController {
privatestaticfinalStringtemplate = "Hello, %s, the %dth visitor!";
privatefinalAtomicLongcounter = newAtomicLong();
privatestaticfinalLoggerlogger = LoggerFactory.getLogger(GreetingController.class);
privateStringgetCurrentSessionID() {
returnManagementFactory.getRuntimeMXBean().getStartTime() + "-" + counter.get();
}
privatelongtaskCall(Stringinput) {
varcurrentCount = counter.get();
Throwablet = null;
vartaskSpan = LLMObs.startTaskSpan("divide_by_zero_task", null, getCurrentSessionID());
try {
varl = 100 / 0;
logger.info("TASK COMPLETE");
} catch (Exceptione) {
t = e;
}
taskSpan.addThrowable(t);
taskSpan.annotateIO("param input is " + input, "current count is " + currentCount);
taskSpan.finish();
logger.info("taskSpan {}", taskSpan);
returncurrentCount;
}
@GetMapping("/greeting")
publicGreetinggreeting(@RequestParam(value = "name", defaultValue = "World") Stringname) {
varsession = getCurrentSessionID();
varworkflowSpan = LLMObs.startWorkflowSpan("workflow", null, session);
varcurrentCount = taskCall(name);
varllmObsSpan1 = LLMObs.startLLMSpan("llm1", "gpt4", "openai", "", session);
varerredLLMSpan = LLMObs.startLLMSpan("llm2-err", "gpt4", "openai", "test-gary-mlapp-override-app", session);
workflowSpan.setTags(newHashMap<String, Object>(){{put("tag1", 1); put("tag2", "a");}});
workflowSpan.setMetrics(newHashMap<>(){{put("input_tokens", 100); put("output_tokens", 100l); put("log_prob", 0.1);}});
llmObsSpan1.annotateIO(
Arrays.asList(
LLMObs.LLMMessage.from("user", "user has hit our API endpoint"),
LLMObs.LLMMessage.from("system", "You are an experienced travel guide. Suggest three vacation destinations for a family looking for sunny weather, outdoor activities and cultural experiences. Each suggestion should be 100-150 words, written in a friendly and conversational tone. Present the suggestions as a numbered list.")
),
Arrays.asList(
LLMObs.LLMMessage.from("assistant", "ok someone visited your API endpoint"
)))
);
llmObsSpan1.setTag("tag1", 1);
llmObsSpan1.setMetadata(newHashMap<String, Object>(){{put("temperature", "1"); put("max_tokens", 100);}});
erredLLMSpan.annotateIO("span2 in", "span2 out");
erredLLMSpan.setTags(newHashMap<String, Object>(){{put("tag1", 1); put("tag2", "a");}});
erredLLMSpan.setErrorMessage("aaa");
varresp = String.format(template, name, currentCount);
workflowSpan.annotateIO(name, resp);
logger.info("workflow {}", workflowSpan);
logger.info("llm1 {}", llmObsSpan1);
logger.info("erredLLMSpan {}", erredLLMSpan);
workflowSpan.finish();
llmObsSpan1.finish();
erredLLMSpan.finish();
returnnewGreeting(counter.incrementAndGet(), resp);
}
}

logging for the spans above

2025-02-13T02:52:24.583-05:00 INFO 53094 --- [nio-8080-exec-1] c.e.restservice.GreetingController : taskSpan datadog.trace.llmobs.domain.DDLLMObsSpan@7b9b90a2, trace_id=479453473746284206, span_id=2948307615785206470, ml_app=gary-test, service=gary-test, span_kind=task, context=DDSpan [ t_id=479453473746284206, s_id=2948307615785206470, p_id=3544560763018401567 ] trace=gary-test/divide_by_zero_task/divide_by_zero_task *errored* tags={_llmobs_tag.input=param input is gary, _llmobs_tag.ml_app=gary-test, _llmobs_tag.output=current count is 0, _llmobs_tag.session_id=1739433141606-0, env=staging, error.message=/ by zero, error.stack=java.lang.ArithmeticException: / by zero
at com.example.restservice.GreetingController.taskCall(GreetingController.java:36)
at com.example.restservice.GreetingController.greeting(GreetingController.java:53)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:255)
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:188)
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:118)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:926)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:831)
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1089)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:979)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1014)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:903)
at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:564)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:885)
at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:658)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:195)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
at datadog.trace.instrumentation.springweb6.HandlerMappingResourceNameFilter.doFilterInternal(HandlerMappingResourceNameFilter.java:50)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
at org.springframework.web.filter.ServletRequestPathFilter.doFilter(ServletRequestPathFilter.java:52)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:352)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:268)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:167)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:90)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:482)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:115)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:344)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:389)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:896)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1741)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52)
at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1190)
at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:63)
at java.base/java.lang.Thread.run(Thread.java:842)
, error.type=java.lang.ArithmeticException, span.kind=task, thread.id=40, thread.name=http-nio-8080-exec-1, version=1.0}
2025-02-13T02:52:24.589-05:00 INFO 53094 --- [nio-8080-exec-1] c.e.restservice.GreetingController : workflow datadog.trace.llmobs.domain.DDLLMObsSpan@375bdc24, trace_id=479453473746284206, span_id=7264160562704185531, ml_app=gary-test, service=gary-test, span_kind=workflow, context=DDSpan [ t_id=479453473746284206, s_id=7264160562704185531, p_id=3544560763018401567 ] trace=gary-test/workflow/workflow tags={_llmobs_metric.input_tokens=100.0, _llmobs_metric.log_prob=0.1, _llmobs_metric.output_tokens=100.0, _llmobs_tag.input=gary, _llmobs_tag.ml_app=gary-test, _llmobs_tag.output=Hello, gary!, _llmobs_tag.session_id=1739433141606-0, _llmobs_tag.tag1=1, _llmobs_tag.tag2=a, env=staging, span.kind=workflow, thread.id=40, thread.name=http-nio-8080-exec-1, version=1.0}
2025-02-13T02:52:24.589-05:00 INFO 53094 --- [nio-8080-exec-1] c.e.restservice.GreetingController : llm1 datadog.trace.llmobs.domain.DDLLMObsSpan@65e7b713, trace_id=479453473746284206, span_id=5473581304479074833, ml_app=gary-test, service=gary-test, span_kind=llm, context=DDSpan [ t_id=479453473746284206, s_id=5473581304479074833, p_id=3544560763018401567 ] trace=gary-test/llm1/llm1 tags={_llmobs_tag._llmobs_tag.model_name=gpt4, _llmobs_tag._llmobs_tag.model_provider=openai, _llmobs_tag.metadata={max_tokens=100, temperature=1}, _llmobs_tag.ml_app=gary-test, _llmobs_tag.session_id=1739433141606-0, _llmobs_tag.tag1=1, env=staging, span.kind=llm, thread.id=40, thread.name=http-nio-8080-exec-1, version=1.0}
2025-02-13T02:52:24.589-05:00 INFO 53094 --- [nio-8080-exec-1] c.e.restservice.GreetingController : erredLLMSpan datadog.trace.llmobs.domain.DDLLMObsSpan@d9d015b, trace_id=479453473746284206, span_id=4239354304348392454, ml_app=test-gary-mlapp-override-app, service=gary-test, span_kind=llm, context=DDSpan [ t_id=479453473746284206, s_id=4239354304348392454, p_id=3544560763018401567 ] trace=gary-test/llm2-err/llm2-err *errored* tags={_llmobs_tag._llmobs_tag.model_name=gpt4, _llmobs_tag._llmobs_tag.model_provider=openai, _llmobs_tag.input=span2 in, _llmobs_tag.ml_app=test-gary-mlapp-override-app, _llmobs_tag.output=span2 out, _llmobs_tag.session_id=1739433141606-0, _llmobs_tag.tag1=1, _llmobs_tag.tag2=a, env=staging, error.message=aaa, span.kind=llm, thread.id=40, thread.name=http-nio-8080-exec-1, version=1.0}
[dd.trace 2025-02-13 02:52:24:589 -0500] [http-nio-8080-exec-1] DEBUG datadog.trace.agent.core.DDSpan - Finished span (PENDING): DDSpan [ t_id=479453473746284206, s_id=7264160562704185531, p_id=3544560763018401567 ] trace=gary-test/workflow/workflow tags={_llmobs_metric.input_tokens=100.0, _llmobs_metric.log_prob=0.1, _llmobs_metric.output_tokens=100.0, _llmobs_tag.input=gary, _llmobs_tag.ml_app=gary-test, _llmobs_tag.output=Hello, gary!, _llmobs_tag.session_id=1739433141606-0, _llmobs_tag.tag1=1, _llmobs_tag.tag2=a, env=staging, span.kind=workflow, thread.id=40, thread.name=http-nio-8080-exec-1, version=1.0}, duration_ns=6872375, forceKeep=false, links=[]

Motivation

Additional Notes

Contributor Checklist

Jira ticket: MLOB-1422

@pr-commenter

pr-commenterBot commented Dec 30, 2024

Copy link
Copy Markdown

Benchmarks

Startup

Parameters

BaselineCandidate
baseline_or_candidatebaselinecandidate
git_branchmastergary/add-llm-obs-api
git_commit_date17459587631745965032
git_commit_shae8a215627177c0
release_version1.49.0-SNAPSHOT~e8a21567c51.49.0-SNAPSHOT~27177c01ea
See matching parameters
BaselineCandidate
applicationinsecure-bankinsecure-bank
ci_job_date17459679961745967996
ci_job_id918053144918053144
ci_pipeline_id6368822463688224
cpu_modelIntel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHzIntel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_versionLinux runner-tsd2jdn2-project-304-concurrent-0-laa74cvd 6.8.0-1027-aws #29~22.04.1-Ubuntu SMP Sun Mar 30 07:45:38 UTC 2025 x86_64 x86_64 x86_64 GNU/LinuxLinux runner-tsd2jdn2-project-304-concurrent-0-laa74cvd 6.8.0-1027-aws #29~22.04.1-Ubuntu SMP Sun Mar 30 07:45:38 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
moduleAgentAgent
parentNoneNone
variantiastiast

Summary

Found 8 performance improvements and 24 performance regressions! Performance is the same for 34 metrics, 5 unstable metrics.

scenarioΔ mean execution_timecandidate mean execution_timebaseline mean execution_time
scenario:startup:insecure-bank:iast:Agent.startworse
[+42.716ms; +50.261ms] or [+3.755%; +4.418%]
1.184s1.138s
scenario:startup:insecure-bank:iast:BytebuddyAgentworse
[+45.045ms; +50.301ms] or [+5.696%; +6.361%]
838.471ms790.798ms
scenario:startup:insecure-bank:iast:Debuggerbetter
[-1.758ms; -1.566ms] or [-29.858%; -26.605%]
4.225ms5.886ms
scenario:startup:insecure-bank:iast:Telemetryworse
[+626.513µs; +910.403µs] or [+7.947%; +11.549%]
8.652ms7.883ms
scenario:startup:insecure-bank:iast_HARDCODED_SECRET_DISABLED:Agent.startworse
[+47.007ms; +53.114ms] or [+4.142%; +4.680%]
1.185s1.135s
scenario:startup:insecure-bank:iast_HARDCODED_SECRET_DISABLED:BytebuddyAgentworse
[+48.093ms; +52.591ms] or [+6.098%; +6.669%]
838.976ms788.634ms
scenario:startup:insecure-bank:iast_HARDCODED_SECRET_DISABLED:Debuggerbetter
[-1.629ms; -1.412ms] or [-28.025%; -24.297%]
4.292ms5.812ms
scenario:startup:insecure-bank:iast_HARDCODED_SECRET_DISABLED:Telemetryworse
[+637.638µs; +840.784µs] or [+8.038%; +10.599%]
8.672ms7.933ms
scenario:startup:insecure-bank:iast_TELEMETRY_OFF:Agent.startworse
[+38.333ms; +70.314ms] or [+3.379%; +6.199%]
1.189s1.134s
scenario:startup:insecure-bank:iast_TELEMETRY_OFF:BytebuddyAgentworse
[+43.852ms; +67.850ms] or [+5.571%; +8.619%]
843.053ms787.202ms
scenario:startup:insecure-bank:iast_TELEMETRY_OFF:Debuggerbetter
[-1.903ms; -1.715ms] or [-31.971%; -28.816%]
4.143ms5.952ms
scenario:startup:insecure-bank:iast_TELEMETRY_OFF:Telemetryworse
[+706.153µs; +1160.367µs] or [+9.133%; +15.007%]
8.665ms7.732ms
scenario:startup:insecure-bank:tracing:Agent.startworse
[+27.575ms; +54.596ms] or [+2.718%; +5.381%]
1.056s1.015s
scenario:startup:insecure-bank:tracing:BytebuddyAgentworse
[+36.505ms; +52.931ms] or [+5.401%; +7.832%]
720.574ms675.856ms
scenario:startup:petclinic:appsec:Agent.startworse
[+43.492ms; +67.143ms] or [+3.789%; +5.850%]
1.203s1.148s
scenario:startup:petclinic:appsec:BytebuddyAgentworse
[+47.957ms; +62.999ms] or [+6.970%; +9.156%]
743.511ms688.033ms
scenario:startup:petclinic:appsec:Debuggerbetter
[-1.636ms; -1.542ms] or [-28.192%; -26.564%]
4.215ms5.804ms
scenario:startup:petclinic:appsec:Telemetryworse
[+775.357µs; +887.140µs] or [+10.541%; +12.061%]
8.187ms7.356ms
scenario:startup:petclinic:iast:Agent.startworse
[+42.809ms; +57.840ms] or [+3.758%; +5.077%]
1.189s1.139s
scenario:startup:petclinic:iast:BytebuddyAgentworse
[+45.055ms; +52.862ms] or [+5.688%; +6.673%]
841.089ms792.130ms
scenario:startup:petclinic:iast:Debuggerbetter
[-1.776ms; -1.500ms] or [-30.047%; -25.370%]
4.274ms5.912ms
scenario:startup:petclinic:iast:Telemetryworse
[+592.581µs; +1089.831µs] or [+7.499%; +13.792%]
8.743ms7.902ms
scenario:startup:petclinic:profiling:Agent.startworse
[+34.270ms; +44.433ms] or [+2.733%; +3.543%]
1.293s1.254s
scenario:startup:petclinic:profiling:ProfilingAgentworse
[+4.991ms; +7.024ms] or [+5.213%; +7.336%]
101.744ms95.737ms
scenario:startup:petclinic:profiling:BytebuddyAgentworse
[+43.906ms; +52.674ms] or [+6.612%; +7.933%]
712.321ms664.031ms
scenario:startup:petclinic:profiling:GlobalTracerbetter
[-15.200ms; -11.374ms] or [-4.055%; -3.034%]
361.595ms374.882ms
scenario:startup:petclinic:profiling:Debuggerbetter
[-1.732ms; -1.603ms] or [-28.511%; -26.389%]
4.408ms6.075ms
scenario:startup:petclinic:profiling:Telemetryworse
[+724.650µs; +983.075µs] or [+8.899%; +12.073%]
8.997ms8.143ms
scenario:startup:petclinic:profiling:Profilingworse
[+4.994ms; +7.028ms] or [+5.215%; +7.339%]
101.772ms95.761ms
scenario:startup:petclinic:tracing:Agent.startworse
[+46.553ms; +57.029ms] or [+4.632%; +5.674%]
1.057s1.005s
scenario:startup:petclinic:tracing:BytebuddyAgentworse
[+48.527ms; +53.657ms] or [+7.240%; +8.005%]
721.350ms670.258ms
scenario:startup:petclinic:tracing:Debuggerbetter
[-1.779ms; -1.649ms] or [-29.111%; -26.988%]
4.397ms6.111ms
Startup time reports for insecure-bank
gantt
title insecure-bank - global startup overhead: candidate=1.49.0-SNAPSHOT~27177c01ea, baseline=1.49.0-SNAPSHOT~e8a21567c5
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.015 s) : 0, 1014514
Total [baseline] (8.671 s) : 0, 8670825
Agent [candidate] (1.056 s) : 0, 1055599
Total [candidate] (8.674 s) : 0, 8673956
section iast
Agent [baseline] (1.138 s) : 0, 1137519
Total [baseline] (9.215 s) : 0, 9215467
Agent [candidate] (1.184 s) : 0, 1184007
Total [candidate] (9.257 s) : 0, 9256591
section iast_HARDCODED_SECRET_DISABLED
Agent [baseline] (1.135 s) : 0, 1134881
Total [baseline] (9.156 s) : 0, 9155585
Agent [candidate] (1.185 s) : 0, 1184942
Total [candidate] (9.231 s) : 0, 9231127
section iast_TELEMETRY_OFF
Agent [baseline] (1.134 s) : 0, 1134352
Total [baseline] (9.173 s) : 0, 9173070
Agent [candidate] (1.189 s) : 0, 1188675
Total [candidate] (9.274 s) : 0, 9274014
Loading
  • baseline results
ModuleVariantDurationΔ tracing
Agenttracing1.015 s-
Agentiast1.138 s123.005 ms (12.1%)
Agentiast_HARDCODED_SECRET_DISABLED1.135 s120.368 ms (11.9%)
Agentiast_TELEMETRY_OFF1.134 s119.838 ms (11.8%)
Totaltracing8.671 s-
Totaliast9.215 s544.642 ms (6.3%)
Totaliast_HARDCODED_SECRET_DISABLED9.156 s484.76 ms (5.6%)
Totaliast_TELEMETRY_OFF9.173 s502.245 ms (5.8%)
  • candidate results
ModuleVariantDurationΔ tracing
Agenttracing1.056 s-
Agentiast1.184 s128.408 ms (12.2%)
Agentiast_HARDCODED_SECRET_DISABLED1.185 s129.343 ms (12.3%)
Agentiast_TELEMETRY_OFF1.189 s133.076 ms (12.6%)
Totaltracing8.674 s-
Totaliast9.257 s582.635 ms (6.7%)
Totaliast_HARDCODED_SECRET_DISABLED9.231 s557.171 ms (6.4%)
Totaliast_TELEMETRY_OFF9.274 s600.058 ms (6.9%)
gantt
title insecure-bank - break down per module: candidate=1.49.0-SNAPSHOT~27177c01ea, baseline=1.49.0-SNAPSHOT~e8a21567c5
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (675.856 ms) : 0, 675856
BytebuddyAgent [candidate] (720.574 ms) : 0, 720574
GlobalTracer [baseline] (242.217 ms) : 0, 242217
GlobalTracer [candidate] (239.391 ms) : 0, 239391
AppSec [baseline] (55.392 ms) : 0, 55392
AppSec [candidate] (55.144 ms) : 0, 55144
Debugger [baseline] (7.631 ms) : 0, 7631
Debugger [candidate] (5.082 ms) : 0, 5082
Remote Config [baseline] (729.7 µs) : 0, 730
Remote Config [candidate] (716.048 µs) : 0, 716
Telemetry [baseline] (9.321 ms) : 0, 9321
Telemetry [candidate] (11.395 ms) : 0, 11395
section iast
BytebuddyAgent [baseline] (790.798 ms) : 0, 790798
BytebuddyAgent [candidate] (838.471 ms) : 0, 838471
GlobalTracer [baseline] (229.73 ms) : 0, 229730
GlobalTracer [candidate] (229.935 ms) : 0, 229935
AppSec [baseline] (56.366 ms) : 0, 56366
AppSec [candidate] (55.173 ms) : 0, 55173
Debugger [baseline] (5.886 ms) : 0, 5886
Debugger [candidate] (4.225 ms) : 0, 4225
Remote Config [baseline] (581.171 µs) : 0, 581
Remote Config [candidate] (603.37 µs) : 0, 603
Telemetry [baseline] (7.883 ms) : 0, 7883
Telemetry [candidate] (8.652 ms) : 0, 8652
IAST [baseline] (22.81 ms) : 0, 22810
IAST [candidate] (23.525 ms) : 0, 23525
section iast_HARDCODED_SECRET_DISABLED
BytebuddyAgent [baseline] (788.634 ms) : 0, 788634
BytebuddyAgent [candidate] (838.976 ms) : 0, 838976
GlobalTracer [baseline] (229.676 ms) : 0, 229676
GlobalTracer [candidate] (229.782 ms) : 0, 229782
AppSec [baseline] (56.058 ms) : 0, 56058
AppSec [candidate] (53.815 ms) : 0, 53815
Debugger [baseline] (5.812 ms) : 0, 5812
Debugger [candidate] (4.292 ms) : 0, 4292
Remote Config [baseline] (597.411 µs) : 0, 597
Remote Config [candidate] (618.091 µs) : 0, 618
Telemetry [baseline] (7.933 ms) : 0, 7933
Telemetry [candidate] (8.672 ms) : 0, 8672
IAST [baseline] (22.724 ms) : 0, 22724
IAST [candidate] (25.309 ms) : 0, 25309
section iast_TELEMETRY_OFF
BytebuddyAgent [baseline] (787.202 ms) : 0, 787202
BytebuddyAgent [candidate] (843.053 ms) : 0, 843053
GlobalTracer [baseline] (230.629 ms) : 0, 230629
GlobalTracer [candidate] (230.577 ms) : 0, 230577
AppSec [baseline] (56.442 ms) : 0, 56442
AppSec [candidate] (55.727 ms) : 0, 55727
Debugger [baseline] (5.952 ms) : 0, 5952
Debugger [candidate] (4.143 ms) : 0, 4143
Remote Config [baseline] (603.709 µs) : 0, 604
Remote Config [candidate] (621.166 µs) : 0, 621
Telemetry [baseline] (7.732 ms) : 0, 7732
Telemetry [candidate] (8.665 ms) : 0, 8665
IAST [baseline] (22.433 ms) : 0, 22433
IAST [candidate] (22.366 ms) : 0, 22366
Loading
Startup time reports for petclinic
gantt
title petclinic - global startup overhead: candidate=1.49.0-SNAPSHOT~27177c01ea, baseline=1.49.0-SNAPSHOT~e8a21567c5
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.005 s) : 0, 1005084
Total [baseline] (10.475 s) : 0, 10474719
Agent [candidate] (1.057 s) : 0, 1056875
Total [candidate] (10.515 s) : 0, 10514548
section appsec
Agent [baseline] (1.148 s) : 0, 1147726
Total [baseline] (10.665 s) : 0, 10664666
Agent [candidate] (1.203 s) : 0, 1203043
Total [candidate] (10.822 s) : 0, 10821973
section iast
Agent [baseline] (1.139 s) : 0, 1139153
Total [baseline] (10.903 s) : 0, 10903280
Agent [candidate] (1.189 s) : 0, 1189477
Total [candidate] (11.097 s) : 0, 11096664
section profiling
Agent [baseline] (1.254 s) : 0, 1253965
Total [baseline] (10.786 s) : 0, 10785955
Agent [candidate] (1.293 s) : 0, 1293316
Total [candidate] (11.016 s) : 0, 11016391
Loading
  • baseline results
ModuleVariantDurationΔ tracing
Agenttracing1.005 s-
Agentappsec1.148 s142.642 ms (14.2%)
Agentiast1.139 s134.069 ms (13.3%)
Agentprofiling1.254 s248.881 ms (24.8%)
Totaltracing10.475 s-
Totalappsec10.665 s189.947 ms (1.8%)
Totaliast10.903 s428.561 ms (4.1%)
Totalprofiling10.786 s311.235 ms (3.0%)
  • candidate results
ModuleVariantDurationΔ tracing
Agenttracing1.057 s-
Agentappsec1.203 s146.168 ms (13.8%)
Agentiast1.189 s132.602 ms (12.5%)
Agentprofiling1.293 s236.441 ms (22.4%)
Totaltracing10.515 s-
Totalappsec10.822 s307.426 ms (2.9%)
Totaliast11.097 s582.116 ms (5.5%)
Totalprofiling11.016 s501.843 ms (4.8%)
gantt
title petclinic - break down per module: candidate=1.49.0-SNAPSHOT~27177c01ea, baseline=1.49.0-SNAPSHOT~e8a21567c5
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (670.258 ms) : 0, 670258
BytebuddyAgent [candidate] (721.35 ms) : 0, 721350
GlobalTracer [baseline] (239.978 ms) : 0, 239978
GlobalTracer [candidate] (239.79 ms) : 0, 239790
AppSec [baseline] (54.657 ms) : 0, 54657
AppSec [candidate] (55.218 ms) : 0, 55218
Debugger [baseline] (6.111 ms) : 0, 6111
Debugger [candidate] (4.397 ms) : 0, 4397
Remote Config [baseline] (706.643 µs) : 0, 707
Remote Config [candidate] (700.012 µs) : 0, 700
Telemetry [baseline] (10.019 ms) : 0, 10019
Telemetry [candidate] (11.939 ms) : 0, 11939
section appsec
BytebuddyAgent [baseline] (688.033 ms) : 0, 688033
BytebuddyAgent [candidate] (743.511 ms) : 0, 743511
GlobalTracer [baseline] (236.281 ms) : 0, 236281
GlobalTracer [candidate] (236.811 ms) : 0, 236811
AppSec [baseline] (175.41 ms) : 0, 175410
AppSec [candidate] (175.127 ms) : 0, 175127
Debugger [baseline] (5.804 ms) : 0, 5804
Debugger [candidate] (4.215 ms) : 0, 4215
Remote Config [baseline] (623.952 µs) : 0, 624
Remote Config [candidate] (625.416 µs) : 0, 625
Telemetry [baseline] (7.356 ms) : 0, 7356
Telemetry [candidate] (8.187 ms) : 0, 8187
IAST [baseline] (21.682 ms) : 0, 21682
IAST [candidate] (22.004 ms) : 0, 22004
section iast
BytebuddyAgent [baseline] (792.13 ms) : 0, 792130
BytebuddyAgent [candidate] (841.089 ms) : 0, 841089
GlobalTracer [baseline] (230.116 ms) : 0, 230116
GlobalTracer [candidate] (231.896 ms) : 0, 231896
AppSec [baseline] (56.253 ms) : 0, 56253
AppSec [candidate] (56.295 ms) : 0, 56295
Debugger [baseline] (5.912 ms) : 0, 5912
Debugger [candidate] (4.274 ms) : 0, 4274
Remote Config [baseline] (587.776 µs) : 0, 588
Remote Config [candidate] (615.228 µs) : 0, 615
Telemetry [baseline] (7.902 ms) : 0, 7902
Telemetry [candidate] (8.743 ms) : 0, 8743
IAST [baseline] (22.724 ms) : 0, 22724
IAST [candidate] (23.111 ms) : 0, 23111
section profiling
BytebuddyAgent [baseline] (664.031 ms) : 0, 664031
BytebuddyAgent [candidate] (712.321 ms) : 0, 712321
GlobalTracer [baseline] (374.882 ms) : 0, 374882
GlobalTracer [candidate] (361.595 ms) : 0, 361595
AppSec [baseline] (54.127 ms) : 0, 54127
AppSec [candidate] (53.337 ms) : 0, 53337
Debugger [baseline] (6.075 ms) : 0, 6075
Debugger [candidate] (4.408 ms) : 0, 4408
Remote Config [baseline] (644.93 µs) : 0, 645
Remote Config [candidate] (661.296 µs) : 0, 661
Telemetry [baseline] (8.143 ms) : 0, 8143
Telemetry [candidate] (8.997 ms) : 0, 8997
ProfilingAgent [baseline] (95.737 ms) : 0, 95737
ProfilingAgent [candidate] (101.744 ms) : 0, 101744
Profiling [baseline] (95.761 ms) : 0, 95761
Profiling [candidate] (101.772 ms) : 0, 101772
Loading

Load

Parameters

BaselineCandidate
baseline_or_candidatebaselinecandidate
end_time2025-04-29T22:36:532025-04-29T22:44:36
git_branchmastergary/add-llm-obs-api
git_commit_date17459587631745965032
git_commit_shae8a215627177c0
release_version1.49.0-SNAPSHOT~e8a21567c51.49.0-SNAPSHOT~27177c01ea
start_time2025-04-29T22:36:382025-04-29T22:44:22
See matching parameters
BaselineCandidate
applicationinsecure-bankinsecure-bank
ci_job_date17459670781745967078
ci_job_id918053145918053145
ci_pipeline_id6368822463688224
cpu_modelIntel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHzIntel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_versionLinux runner-tsd2jdn2-project-304-concurrent-1-5p1cojp2 6.8.0-1027-aws #29~22.04.1-Ubuntu SMP Sun Mar 30 07:45:38 UTC 2025 x86_64 x86_64 x86_64 GNU/LinuxLinux runner-tsd2jdn2-project-304-concurrent-1-5p1cojp2 6.8.0-1027-aws #29~22.04.1-Ubuntu SMP Sun Mar 30 07:45:38 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
variantiastiast

Summary

Found 0 performance improvements and 0 performance regressions! Performance is the same for 12 metrics, 18 unstable metrics.

Request duration reports for insecure-bank
gantt
title insecure-bank - request duration [CI 0.99] : candidate=1.49.0-SNAPSHOT~27177c01ea, baseline=1.49.0-SNAPSHOT~e8a21567c5
dateFormat X
axisFormat %s
section baseline
no_agent (381.538 µs) : 362, 401
. : milestone, 382,
iast (524.519 µs) : 502, 547
. : milestone, 525,
iast_FULL (736.455 µs) : 713, 760
. : milestone, 736,
iast_GLOBAL (571.371 µs) : 548, 594
. : milestone, 571,
iast_HARDCODED_SECRET_DISABLED (512.874 µs) : 490, 536
. : milestone, 513,
iast_INACTIVE (470.395 µs) : 448, 493
. : milestone, 470,
iast_TELEMETRY_OFF (516.565 µs) : 494, 539
. : milestone, 517,
tracing (455.345 µs) : 434, 477
. : milestone, 455,
section candidate
no_agent (376.101 µs) : 356, 396
. : milestone, 376,
iast (519.522 µs) : 498, 542
. : milestone, 520,
iast_FULL (729.133 µs) : 707, 751
. : milestone, 729,
iast_GLOBAL (564.721 µs) : 543, 586
. : milestone, 565,
iast_HARDCODED_SECRET_DISABLED (512.141 µs) : 491, 534
. : milestone, 512,
iast_INACTIVE (469.599 µs) : 448, 491
. : milestone, 470,
iast_TELEMETRY_OFF (502.811 µs) : 481, 525
. : milestone, 503,
tracing (462.07 µs) : 441, 483
. : milestone, 462,
Loading
  • baseline results
VariantRequest duration [CI 0.99]Δ no_agent
no_agent381.538 µs [361.712 µs, 401.365 µs]-
iast524.519 µs [502.141 µs, 546.897 µs]142.981 µs (37.5%)
iast_FULL736.455 µs [712.889 µs, 760.021 µs]354.917 µs (93.0%)
iast_GLOBAL571.371 µs [548.434 µs, 594.308 µs]189.833 µs (49.8%)
iast_HARDCODED_SECRET_DISABLED512.874 µs [489.998 µs, 535.75 µs]131.336 µs (34.4%)
iast_INACTIVE470.395 µs [448.194 µs, 492.596 µs]88.857 µs (23.3%)
iast_TELEMETRY_OFF516.565 µs [493.837 µs, 539.292 µs]135.026 µs (35.4%)
tracing455.345 µs [433.771 µs, 476.919 µs]73.807 µs (19.3%)
  • candidate results
VariantRequest duration [CI 0.99]Δ no_agent
no_agent376.101 µs [356.319 µs, 395.882 µs]-
iast519.522 µs [497.512 µs, 541.533 µs]143.422 µs (38.1%)
iast_FULL729.133 µs [707.209 µs, 751.057 µs]353.032 µs (93.9%)
iast_GLOBAL564.721 µs [543.074 µs, 586.368 µs]188.62 µs (50.2%)
iast_HARDCODED_SECRET_DISABLED512.141 µs [490.557 µs, 533.725 µs]136.04 µs (36.2%)
iast_INACTIVE469.599 µs [447.986 µs, 491.212 µs]93.498 µs (24.9%)
iast_TELEMETRY_OFF502.811 µs [480.986 µs, 524.637 µs]126.711 µs (33.7%)
tracing462.07 µs [440.944 µs, 483.197 µs]85.97 µs (22.9%)
Request duration reports for petclinic
gantt
title petclinic - request duration [CI 0.99] : candidate=1.49.0-SNAPSHOT~27177c01ea, baseline=1.49.0-SNAPSHOT~e8a21567c5
dateFormat X
axisFormat %s
section baseline
no_agent (1.358 ms) : 1339, 1378
. : milestone, 1358,
appsec (1.73 ms) : 1706, 1754
. : milestone, 1730,
appsec_no_iast (1.735 ms) : 1711, 1759
. : milestone, 1735,
code_origins (1.645 ms) : 1618, 1672
. : milestone, 1645,
iast (1.512 ms) : 1487, 1537
. : milestone, 1512,
profiling (1.542 ms) : 1517, 1566
. : milestone, 1542,
tracing (1.497 ms) : 1472, 1522
. : milestone, 1497,
section candidate
no_agent (1.356 ms) : 1336, 1376
. : milestone, 1356,
appsec (1.743 ms) : 1720, 1767
. : milestone, 1743,
appsec_no_iast (1.738 ms) : 1715, 1761
. : milestone, 1738,
code_origins (1.696 ms) : 1668, 1723
. : milestone, 1696,
iast (1.534 ms) : 1510, 1558
. : milestone, 1534,
profiling (1.589 ms) : 1565, 1614
. : milestone, 1589,
tracing (1.522 ms) : 1498, 1547
. : milestone, 1522,
Loading
  • baseline results
VariantRequest duration [CI 0.99]Δ no_agent
no_agent1.358 ms [1.339 ms, 1.378 ms]-
appsec1.73 ms [1.706 ms, 1.754 ms]371.855 µs (27.4%)
appsec_no_iast1.735 ms [1.711 ms, 1.759 ms]376.351 µs (27.7%)
code_origins1.645 ms [1.618 ms, 1.672 ms]286.644 µs (21.1%)
iast1.512 ms [1.487 ms, 1.537 ms]153.774 µs (11.3%)
profiling1.542 ms [1.517 ms, 1.566 ms]183.167 µs (13.5%)
tracing1.497 ms [1.472 ms, 1.522 ms]138.782 µs (10.2%)
  • candidate results
VariantRequest duration [CI 0.99]Δ no_agent
no_agent1.356 ms [1.336 ms, 1.376 ms]-
appsec1.743 ms [1.72 ms, 1.767 ms]387.508 µs (28.6%)
appsec_no_iast1.738 ms [1.715 ms, 1.761 ms]382.51 µs (28.2%)
code_origins1.696 ms [1.668 ms, 1.723 ms]339.962 µs (25.1%)
iast1.534 ms [1.51 ms, 1.558 ms]178.326 µs (13.2%)
profiling1.589 ms [1.565 ms, 1.614 ms]233.633 µs (17.2%)
tracing1.522 ms [1.498 ms, 1.547 ms]166.539 µs (12.3%)

Dacapo

private static LLMObsSpanFactory SPAN_FACTORY = NoOpLLMObsSpanFactory.INSTANCE;

/**
* This a hook for injecting SpanFactory implementation. It should only be used internally by

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI, internal APIs should be added to the internal-api module.

You can keep the same package structure and they will still be visible to the tracer internals.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah gotcha, thanks!

@mcculls
mccullsforce-pushed the gary/add-llmobs-configs branch from 14f71b3 to 5d90450CompareJanuary 7, 2025 09:35
Base automatically changed from gary/add-llmobs-configs to masterJanuary 7, 2025 15:36
@github-actions

Copy link
Copy Markdown
Contributor

Hi! 👋 Looks like you updated a Git Submodule.
If this was not intentional please make sure to:

@github-actions

Copy link
Copy Markdown
Contributor

Hi! 👋 Looks like you updated a Git Submodule.
If this was not intentional please make sure to:

@gary-huang
gary-huangforce-pushed the gary/add-llm-obs-api branch 6 times, most recently from c1f63dc to 6e250a2CompareMarch 7, 2025 13:34
@gary-huang
gary-huangforce-pushed the gary/add-llm-obs-api branch from 6e250a2 to d16b87dCompareMarch 26, 2025 01:14
@gary-huang
gary-huangforce-pushed the gary/add-llm-obs-api branch from d16b87d to b5c7a0aCompareApril 10, 2025 19:09
@gary-huang
gary-huang marked this pull request as ready for review April 23, 2025 12:04
@gary-huang
gary-huang requested a review from a team as a code ownerApril 23, 2025 12:04
@github-actions

github-actionsBot commented Apr 23, 2025

Copy link
Copy Markdown
Contributor

Hi! 👋 Thanks for your pull request! 🎉

To help us review it, please make sure to:

  • Add at least one type, and one component or instrumentation label to the pull request

If you need help, please check our contributing guidelines.

@gary-huanggary-huang changed the title add APIs for llm obsadd APIs for llm obs sdkApr 23, 2025
@gary-huanggary-huang added the comp: mlobs ML Observability (LLMObs) label Apr 23, 2025
@gary-huanggary-huang added tag: experimental Experimental changes type: feature Enhancements and improvements labels Apr 23, 2025
@gary-huang
gary-huang changed the base branch from master to gary/llmobs-sdk-mergeApril 23, 2025 12:12

@nayeem-kamalnayeem-kamal left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall LGTM. I would just address the comment left by Stuart earlier in the PR. Is there a reason this api isn't in internal-api?

@PerfectSlayerPerfectSlayer left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left few comments about API design.

Can you also add your GitHub team as the owner of this new llmobs package from internal API?

@Nullable String mlApp,
@Nullable String sessionID) {

return SPAN_FACTORY.startLLMSpan(spanName, modelName, modelProvider, mlApp, sessionID);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
returnSPAN_FACTORY.startLLMSpan(spanName, modelName, modelProvider, mlApp, sessionID);
returnSPAN_FACTORY.startLLMSpan(spanName, modelName, modelProvider, mlApp, sessionId);

We usually follow the Java naming convention across the code base using xxxId rather than xxxID (like span, trace, etc...).

Comment on lines +8 to +9
public class LLMObs {
protected LLMObs() {}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should it a public final class with private constructor if it’s only an helper class?

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://github.com/DataDog/dd-trace-java/pull/8390/files#diff-ee71e1544f39cc6c551488ad74b877a819b780b9d07c2983be13b80161958aa9R1-R10

i extend this class here to allow setting an implemented, non-noop span factory (and in another PR, another factory)

i would say that this is not exactly only a helper class, this is the entry point of the SDK manual API and the calls are registered with the llmobs agent (as seen in #8390)

@gary-huang

gary-huang commented Apr 28, 2025

Copy link
Copy Markdown
ContributorAuthor

Overall LGTM. I would just address the comment left by Stuart earlier in the PR. Is there a reason this api isn't in internal-api?

@nayeem-kamal what Stuart pointed out was a previous function that allows the setting of the span factory - which is meant to be kept internal and out of user's control, my previous implementation had that function in the api package, but that has been moved since https://github.com/DataDog/dd-trace-java/pull/8390/files#diff-ee71e1544f39cc6c551488ad74b877a819b780b9d07c2983be13b80161958aa9R1-R10

these APIs are meant to be for users' to start llm obs spans, so no, they are not meant to be in internal-api

@gary-huang
gary-huang merged commit 82b8418 into gary/llmobs-sdk-mergeMay 7, 2025
@gary-huang
gary-huang deleted the gary/add-llm-obs-api branch May 7, 2025 15:08
gary-huang added a commit that referenced this pull request May 14, 2025
* add APIs for llm obs
* add llm message class to support llm spans
* follow java convention of naming Id instead of ID
* add codeowners
gary-huang added a commit that referenced this pull request Jun 4, 2025
* add APIs for llm obs
* add llm message class to support llm spans
* add llm message class to support llm spans
* impl llmobs agent and llmobs apis
* support llm messages with tool calls
* handle default model name and provider
* rm unneeded file
* spotless
* add APIs for llm obs sdk (#8135)
* add APIs for llm obs
* add llm message class to support llm spans
* follow java convention of naming Id instead of ID
* add codeowners
* rename ID to Id according to java naming conventions
* Undo change to integrations-core submodule
* fix build gradle
* rm empty line
* fix test
gary-huang added a commit that referenced this pull request Jul 9, 2025
* add APIs for llm obs
* add llm message class to support llm spans
* follow java convention of naming Id instead of ID
* add codeowners
gary-huang added a commit that referenced this pull request Jul 9, 2025
* add APIs for llm obs
* add llm message class to support llm spans
* add llm message class to support llm spans
* impl llmobs agent and llmobs apis
* support llm messages with tool calls
* handle default model name and provider
* rm unneeded file
* spotless
* add APIs for llm obs sdk (#8135)
* add APIs for llm obs
* add llm message class to support llm spans
* follow java convention of naming Id instead of ID
* add codeowners
* rename ID to Id according to java naming conventions
* Undo change to integrations-core submodule
* fix build gradle
* rm empty line
* fix test
nayeem-kamal added a commit that referenced this pull request Jul 9, 2025
* add APIs for llm obs sdk (#8135)
* add APIs for llm obs
* add llm message class to support llm spans
* follow java convention of naming Id instead of ID
* add codeowners
* implement LLM Obs SDK spans APIs (#8390)
* add APIs for llm obs
* add llm message class to support llm spans
* add llm message class to support llm spans
* impl llmobs agent and llmobs apis
* support llm messages with tool calls
* handle default model name and provider
* rm unneeded file
* spotless
* add APIs for llm obs sdk (#8135)
* add APIs for llm obs
* add llm message class to support llm spans
* follow java convention of naming Id instead of ID
* add codeowners
* rename ID to Id according to java naming conventions
* Undo change to integrations-core submodule
* fix build gradle
* rm empty line
* fix test
* LLM Obs SDK Mapper (#8372)
* add APIs for llm obs
* add llm message class to support llm spans
* add llm message class to support llm spans
* impl llmobs agent and llmobs apis
* support llm messages with tool calls
* handle default model name and provider
* rm unneeded file
* impl llmobs agent and llmobs apis
* impl llmobs agent
* working writer
* add support for llm message and tool calls
* cleaned up whitespace
* resolve merge conflicts
* remaining merge conflicts
* fix bad method call
* fixed llmobs intake creation if llmobs not enabled
* removed print statements
* added tests for llmobsspanmapper
* fixed coverage for tags
---------
Co-authored-by: Nayeem Kamal <nayeem.kamal@datadoghq.com>
* updated to master submodule
* LLM Obs SDK use context API for parent children span linkage (#8711)
* add APIs for llm obs
* add llm message class to support llm spans
* add llm message class to support llm spans
* impl llmobs agent and llmobs apis
* support llm messages with tool calls
* handle default model name and provider
* rm unneeded file
* impl llmobs agent and llmobs apis
* impl llmobs agent
* working writer
* add support for llm message and tool calls
* impl llmobs agent and llmobs apis
* use new ctx api to track parent span
* cleaned up whitespace
* resolve merge conflicts
* remaining merge conflicts
* fix bad method call
* fixed llmobs intake creation if llmobs not enabled
* removed print statements
* ran spotless
* added tests for llmobsspanmapper
* fixed coverage for tags
---------
Co-authored-by: Nayeem Kamal <nayeem.kamal@datadoghq.com>
Co-authored-by: Nayeem Kamal <kamal.nayeem12@gmail.com>
* LLM Obs SDK evaluation metrics submission (#8688)
* add APIs for llm obs
* add llm message class to support llm spans
* add llm message class to support llm spans
* impl llmobs agent and llmobs apis
* support llm messages with tool calls
* handle default model name and provider
* rm unneeded file
* impl llmobs agent and llmobs apis
* impl llmobs agent
* working writer
* add support for llm message and tool calls
* impl llmobs agent and llmobs apis
* use new ctx api to track parent span
* add api for evals
* working impl supporting both agentless and agent
* handle null tags and default to default ml app if null or empty string provided in the override
* cleaned up whitespace
* resolve merge conflicts
* remaining merge conflicts
* fix bad method call
* fixed llmobs intake creation if llmobs not enabled
* removed print statements
* ran spotless
* ran spotless
* added tests for llmobsspanmapper
* fixed coverage for tags
---------
Co-authored-by: Nayeem Kamal <nayeem.kamal@datadoghq.com>
Co-authored-by: Nayeem Kamal <kamal.nayeem12@gmail.com>
* fix CODEOWNERS
---------
Co-authored-by: Nayeem Kamal <nayeem.kamal@datadoghq.com>
Co-authored-by: Nayeem Kamal <kamal.nayeem12@gmail.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp: mlobsML Observability (LLMObs)tag: experimentalExperimental changestype: featureEnhancements and improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@gary-huang@mcculls@PerfectSlayer@nayeem-kamal