Skip to content

Commit

Permalink
Avoids NoClassDefFoundError: Could not initialize class DDSpanLink$En…
Browse files Browse the repository at this point in the history
…coderHolder in Graal native-image (#8036)

Both fromJson and toJson methods need to be registered, do the same for other JSON entries to be consistent.

Also declare some JsonRule types need reflective access for a related issue using DD_TRACE_SAMPLING_RULES
  • Loading branch information
mcculls authored Nov 29, 2024
1 parent 896dd6b commit a62e471
Showing 1 changed file with 21 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,24 +38,42 @@
{
"name" : "datadog.trace.agent.common.sampling.SpanSamplingRules$RuleAdapter",
"methods": [
{"name": "fromJson"}
{"name": "fromJson"},
{"name": "toJson"}
]
},
{
"name" : "datadog.trace.agent.common.sampling.SpanSamplingRules$JsonRule",
"allDeclaredConstructors" : true,
"allPublicConstructors" : true,
"allDeclaredFields" : true,
"allPublicFields" : true
},
{
"name" : "datadog.trace.agent.common.sampling.TraceSamplingRules$RuleAdapter",
"methods": [
{"name": "fromJson"}
{"name": "fromJson"},
{"name": "toJson"}
]
},
{
"name" : "datadog.trace.agent.common.sampling.TraceSamplingRules$JsonRule",
"allDeclaredConstructors" : true,
"allPublicConstructors" : true,
"allDeclaredFields" : true,
"allPublicFields" : true
},
{
"name" : "datadog.trace.agent.core.TracingConfigPoller$TracingSamplingRulesAdapter",
"methods": [
{"name": "fromJson"}
{"name": "fromJson"},
{"name": "toJson"}
]
},
{
"name" : "datadog.trace.agent.core.DDSpanLink$SpanLinkAdapter",
"methods": [
{"name": "fromSpanLinkJson"},
{"name": "toSpanLinkJson"}
]
},
Expand Down

0 comments on commit a62e471

Please sign in to comment.