inspectIT Ocelot java自动化插装使用手册
in java with 0 comment

inspectIT Ocelot java自动化插装使用手册

in java with 0 comment

inspectIT Ocelot java自动化插装使用手册

使用手册

inspectIT Ocelot 的文档写的比较乱 但梳理下其实可以发现这就是个写规则的过程的

scope: 定义了需要插装的点

action: 是在插装点上要做的操作

rules: 将插装点和的动作组合

首先是启动配置,以下举例在Elasticsearch中启动脚本中增加的配置:

    -Djava.security.policy=/opt/ocelot.policy \
    -javaagent:/opt/inspectit-ocelot-agent/inspectit-ocelot-agent-2.5.6.jar \
    -Dinspectit.exporters.tracing.jaeger.enabled=ENABLED \
    -Dinspectit.exporters.tracing.jaeger.endpoint=http://127.0.0.1:14268/api/traces \
    -Dinspectit.exporters.tracing.jaeger.protocol=http/thrift \
    -Dinspectit.exporters.metrics.prometheus.enabled=ENABLED \
    -Dinspectit.config.file-based.path=/opt/inspectit-config \
    -Dinspectit.logging.file.path=/opt/inspectit/logs/ \
    -Dinspectit.exporters.tracing.service-name="inspectit-exporters-tracing" \

其中/opt/inspectit-config 包含以下几个文件:

es-scopes.yml 定义插装函数位置

inspectit:
  instrumentation:
    scopes:
      s_coerate_handle_req:
        docs:
          description: 'Scope for executed datanode query.'
        superclass:
          name: org.elasticsearch.common.component.AbstractLifecycleComponent
        interfaces:
          - name: org.elasticsearch.http.HttpServerTransport
        type:
          name: org.elasticsearch.http.AbstractHttpServerTransport
        methods:
          - name: incomingRequest
            matcher-mode: EQUALS_FULLY
        advanced:
          instrument-only-inherited-methods: false

es-actions.yml 定义操作 在jar包中已经定义了部门默认操作可以直接使用

inspectit:
  instrumentation:
    actions:
      #computes a nanosecond-timestamp as a long for the current point in time
      'a_timing_nanos':
        value: 'new Long(System.nanoTime())'
      #computes the elapsed milliseconds as double since a given nanosecond-timestamp
      'a_timing_elapsedMillis':
        input:
          #the timestamp captured via System.nanoTime() to compare against
          'since_nanos': 'long'
        value: 'new Double( (System.nanoTime() - since_nanos) * 1E-6)'
      'a_string_replace_all':
        input:
          'regex': 'String'
          'replacement': 'String'
          'string': 'String'
        value: 'string.replaceAll(regex,replacement)'
      'a_method_getClassFQN':
        input:
          _class: Class
        value: '_class.getName()'

es-actions.yml

inspectit:
  instrumentation:
    rules:
      'r_record_method_duration':
        scopes:
          's_coerate_handle_req': true  ## 插桩点
        entry:
          'method_entry_time':
            action: 'a_timing_nanos'
          'class_name':
            action: 'a_method_getClassFQN'
          'method_name_with_params':
            action: 'a_method_getNameWithParameters'
        exit:
          'method_duration':
            action: 'a_timing_elapsedMillis'
            data-input:
              'since_nanos': 'method_entry_time'
        metrics:
          '[method/duration]' :
            value: 'method_duration'
            data-tags:
              'class': 'class_name'
              'method': 'method_name_with_params'
        tracing:
          start-span: true
          auto-tracing: true
~

注意事项

问题一

 ERROR 13215  --- [inspectIT] [pectit-thread-0] r.i.o.c.i.a.GenericActionGenerator       : Error creating generic action 'a_method_getFQN' in context of class org.apache.http.impl.client.InternalHttpClient! Using a No-Operation action instead!
[inspectit-thread-053]2024-01-29T15:42:53,926][INFO ][stdout                   ] [ampere03] javassist.compiler.CompileError: javassist.NotFoundException: java.lang.Object[]
[inspectit-thread-053]2024-01-29T15:42:53,926][INFO ][stdout                   ] [ampere03]     at javassist.compiler.Javac.compileBody(Javac.java:234)
[inspectit-thread-053]2024-01-29T15:42:53,927][INFO ][stdout                   ] [ampere03]     at javassist.CtBehavior.setBody(CtBehavior.java:466)
[inspectit-thread-053]2024-01-29T15:42:53,927][INFO ][stdout                   ] [ampere03]     ... 33 common frames omitted
[inspectit-thread-053]2024-01-29T15:42:53,927][INFO ][stdout                   ] [ampere03] Wrapped by: javassist.CannotCompileException: [source error] javassist.NotFoundException: java.lang.Object[]
[inspectit-thread-053]2024-01-29T15:42:53,927][INFO ][stdout                   ] [ampere03]     at javassist.CtBehavior.setBody(CtBehavior.java:474)
[inspectit-thread-053]2024-01-29T15:42:53,927][INFO ][stdout                   ] [ampere03]     at javassist.CtBehavior.setBody(CtBehavior.java:440)
[inspectit-thread-053]2024-01-29T15:42:53,927][INFO ][stdout                   ] [ampere03]     at rocks.inspectit.ocelot.core.instrumentation.actions.GenericActionGenerator.buildGenericActionByteCode(GenericActionGenerator.java:149)
[inspectit-thread-053]2024-01-29T15:42:53,927][INFO ][stdout                   ] [ampere03]     at rocks.inspectit.ocelot.core.instrumentation.actions.GenericActionGenerator.lambda$getOrGenerateGenericAction$0(GenericActionGenerator.java:110)
[inspectit-thread-053]2024-01-29T15:42:53,927][INFO ][stdout                   ] [ampere03]     at rocks.inspectit.ocelot.core.instrumentation.injection.ClassInjector.inject(ClassInjector.java:121)
[inspectit-thread-053]2024-01-29T15:42:53,927][INFO ][stdout                   ] [ampere03]     at rocks.inspectit.ocelot.core.instrumentation.injection.ClassInjector.inject(ClassInjector.java:101)
[inspectit-thread-053]2024-01-29T15:42:53,927][INFO ][stdout                   ] [ampere03]     at rocks.inspectit.ocelot.core.instrumentation.actions.GenericActionGenerator.lambda$getOrGenerateGenericAction$1(GenericActionGenerator.java:109)
[inspectit-thread-053]2024-01-29T15:42:53,927][INFO ][stdout                   ] [ampere03]     at com.google.common.cache.LocalCache$LocalManualCache$1.load(LocalCache.java:4868)
[inspectit-thread-053]2024-01-29T15:42:53,927][INFO ][stdout                   ] [ampere03]     at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3533)
[inspectit-thread-053]2024-01-29T15:42:53,927][INFO ][stdout                   ] [ampere03]     at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2282)
[inspectit-thread-053]2024-01-29T15:42:53,927][INFO ][stdout                   ] [ampere03]     ... 24 common frames omitted
[inspectit-thread-053]2024-01-29T15:42:53,928][INFO ][stdout                   ] [ampere03] Wrapped by: java.util.concurrent.ExecutionException: javassist.CannotCompileException: [source error] javassist.NotFoundException: java.lang.Object[]
[inspectit-thread-053]2024-01-29T15:42:53,928][INFO ][stdout                   ] [ampere03]     at com.google.common.util.concurrent.AbstractFuture.getDoneValue(AbstractFuture.java:588)
[inspectit-thread-053]2024-01-29T15:42:53,928][INFO ][stdout                   ] [ampere03]     at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:547)
[inspectit-thread-053]2024-01-29T15:42:53,928][INFO ][stdout                   ] [ampere03]     at com.google.common.util.concurrent.AbstractFuture$TrustedFuture.get(AbstractFuture.java:113)
[inspectit-thread-053]2024-01-29T15:42:53,928][INFO ][stdout                   ] [ampere03]     at com.google.common.util.concurrent.Uninterruptibles.getUninterruptibly(Uninterruptibles.java:240)
[inspectit-thread-053]2024-01-29T15:42:53,928][INFO ][stdout                   ] [ampere03]     at com.google.common.cache.LocalCache$Segment.getAndRecordStats(LocalCache.java:2317)
[inspectit-thread-053]2024-01-29T15:42:53,928][INFO ][stdout                   ] [ampere03]     at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2283)
[inspectit-thread-053]2024-01-29T15:42:53,928][INFO ][stdout                   ] [ampere03]     at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2159)
[inspectit-thread-053]2024-01-29T15:42:53,928][INFO ][stdout                   ] [ampere03]     at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2049)
[inspectit-thread-053]2024-01-29T15:42:53,928][INFO ][stdout                   ] [ampere03]     at com.google.common.cache.LocalCache.get(LocalCache.java:3966)
[inspectit-thread-053]2024-01-29T15:42:53,928][INFO ][stdout                   ] [ampere03]     at com.google.common.cache.LocalCache$LocalManualCache.get(LocalCache.java:4863)
[inspectit-thread-053]2024-01-29T15:42:53,928][INFO ][stdout                   ] [ampere03]     at rocks.inspectit.ocelot.core.instrumentation.actions.GenericActionGenerator.getOrGenerateGenericAction(GenericActionGenerator.java:107)
[inspectit-thread-053]2024-01-29T15:42:53,928][INFO ][stdout                   ] [ampere03]     at rocks.inspectit.ocelot.core.instrumentation.hook.ActionCallGenerator.generateAndBindGenericAction(ActionCallGenerator.java:41)
[inspectit-thread-053]2024-01-29T15:42:53,928][INFO ][stdout                   ] [ampere03]     at rocks.inspectit.ocelot.core.instrumentation.hook.MethodHookGenerator.buildActionCalls(MethodHookGenerator.java:282)
[inspectit-thread-053]2024-01-29T15:42:53,929][INFO ][stdout                   ] [ampere03]     at rocks.inspectit.ocelot.core.instrumentation.hook.MethodHookGenerator.buildHook(MethodHookGenerator.java:95)
[inspectit-thread-053]2024-01-29T15:42:53,929][INFO ][stdout                   ] [ampere03]     at rocks.inspectit.ocelot.core.instrumentation.hook.HookManager$HookUpdate.lambda$addOrReplaceHooks$6(HookManager.java:316)
[inspectit-thread-053]2024-01-29T15:42:53,929][INFO ][stdout                   ] [ampere03]     at java.base/java.util.HashMap.forEach(HashMap.java:1429)
[inspectit-thread-053]2024-01-29T15:42:53,929][INFO ][stdout                   ] [ampere03]     at rocks.inspectit.ocelot.core.instrumentation.hook.HookManager$HookUpdate.addOrReplaceHooks(HookManager.java:307)
[inspectit-thread-053]2024-01-29T15:42:53,929][INFO ][stdout                   ] [ampere03]     at rocks.inspectit.ocelot.core.instrumentation.hook.HookManager$HookUpdate.updateHooksForClass(HookManager.java:246)
[inspectit-thread-053]2024-01-29T15:42:53,929][INFO ][stdout                   ] [ampere03]     at rocks.inspectit.ocelot.core.instrumentation.InstrumentationTriggerer.updateClass(InstrumentationTriggerer.java:261)
[inspectit-thread-053]2024-01-29T15:42:53,929][INFO ][stdout                   ] [ampere03]     at rocks.inspectit.ocelot.core.instrumentation.InstrumentationTriggerer.getBatchOfClassesToRetransform(InstrumentationTriggerer.java:220)
[inspectit-thread-053]2024-01-29T15:42:53,929][INFO ][stdout                   ] [ampere03]     at rocks.inspectit.ocelot.core.instrumentation.InstrumentationTriggerer.checkClassesForConfigurationUpdates(InstrumentationTriggerer.java:148)
[inspectit-thread-053]2024-01-29T15:42:53,929][INFO ][stdout                   ] [ampere03]     at rocks.inspectit.ocelot.core.service.BatchJobExecutorService.lambda$startJob$0(BatchJobExecutorService.java:126)
[inspectit-thread-053]2024-01-29T15:42:53,929][INFO ][stdout                   ] [ampere03]     at rocks.inspectit.ocelot.core.service.BatchJobExecutorService$BatchJob.lambda$new$0(BatchJobExecutorService.java:83)
[inspectit-thread-053]2024-01-29T15:42:53,929][INFO ][stdout                   ] [ampere03]     at rocks.inspectit.ocelot.core.instrumentation.context.ContextManager.lambda$wrap$1(ContextManager.java:76)
[inspectit-thread-053]2024-01-29T15:42:53,929][INFO ][stdout                   ] [ampere03]     at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:577)
[inspectit-thread-053]2024-01-29T15:42:53,929][INFO ][stdout                   ] [ampere03]     at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
[inspectit-thread-053]2024-01-29T15:42:53,930][INFO ][stdout                   ] [ampere03]     at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
[inspectit-thread-053]2024-01-29T15:42:53,930][INFO ][stdout                   ] [ampere03]     at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
[inspectit-thread-053]2024-01-29T15:42:53,930][INFO ][stdout                   ] [ampere03]     at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
[inspectit-thread-053]2024-01-29T15:42:53,930][INFO ][stdout                   ] [ampere03]     at java.base/java.lang.Thread.run(Unknown Source)
[inspectit-thread-053]2024-01-29T15:42:53,932][INFO ][stdout                   ] [ampere03] 2024-01-29 15:42:53,932 ERROR 13221  --- [inspectIT] [pectit-thread-0] r.i.o.c.i.a.GenericActionGenerator       : Error creating generic action 'a_apacheclient_downPropagation' in context of class org.apache.http.impl.client.InternalHttpClient! Using a No-Operation action instead!
[inspectit-thread-053]2024-01-29T15:42:53,932][INFO ][stdout                   ] [ampere03] javassist.compiler.CompileError: javassist.NotFoundException: java.lang.Object[]
[inspectit-thread-053]2024-01-29T15:42:53,932][INFO ][stdout                   ] [ampere03]     at javassist.compiler.Javac.compileBody(Javac.java:234)
[inspectit-thread-053]2024-01-29T15:42:53,932][INFO ][stdout                   ] [ampere03]     at javassist.CtBehavior.setBody(CtBehavior.java:466)
[inspectit-thread-053]2024-01-29T15:42:53,933][INFO ][stdout                   ] [ampere03]     ... 33 common frames omitted
[inspectit-thread-053]2024-01-29T15:42:53,933][INFO ][stdout                   ] [ampere03] Wrapped by: javassist.CannotCompileException: [source error] javassist.NotFoundException: java.lang.Object[]
[inspectit-thread-053]2024-01-29T15:42:53,933][INFO ][stdout                   ] [ampere03]     at javassist.CtBehavior.setBody(CtBehavior.java:474)
[inspectit-thread-053]2024-01-29T15:42:53,933][INFO ][stdout                   ] [ampere03]     at javassist.CtBehavior.setBody(CtBehavior.java:440)
[inspectit-thread-053]2024-01-29T15:42:53,933][INFO ][stdout                   ] [ampere03]     at rocks.inspectit.ocelot.core.instrumentation.actions.GenericActionGenerator.buildGenericActionByteCode(GenericActionGenerator.java:149)
[inspectit-thread-053]2024-01-29T15:42:53,933][INFO ][stdout                   ] [ampere03]     at rocks.inspectit.ocelot.core.instrumentation.actions.GenericActionGenerator.lambda$getOrGenerateGenericAction$0(GenericActionGenerator.java:110)
[inspectit-thread-053]2024-01-29T15:42:53,933][INFO ][stdout                   ] [ampere03]     at rocks.inspectit.ocelot.core.instrumentation.injection.ClassInjector.inject(ClassInjector.java:121)
[inspectit-thread-053]2024-01-29T15:42:53,933][INFO ][stdout                   ] [ampere03]     at rocks.inspectit.ocelot.core.instrumentation.injection.ClassInjector.inject(ClassInjector.java:101)
[inspectit-thread-053]2024-01-29T15:42:53,933][INFO ][stdout                   ] [ampere03]     at rocks.inspectit.ocelot.core.instrumentation.actions.GenericActionGenerator.lambda$getOrGenerateGenericAction$1(GenericActionGenerator.java:109)
[inspectit-thread-053]2024-01-29T15:42:53,933][INFO ][stdout                   ] [ampere03]     at com.google.common.cache.LocalCache$LocalManualCache$1.load(LocalCache.java:4868)
[inspectit-thread-053]2024-01-29T15:42:53,933][INFO ][stdout                   ] [ampere03]     at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3533)
[inspectit-thread-053]2024-01-29T15:42:53,933][INFO ][stdout                   ] [ampere03]     at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2282)
[inspectit-thread-053]2024-01-29T15:42:53,933][INFO ][stdout                   ] [ampere03]     ... 24 common frames omitted
[inspectit-thread-053]2024-01-29T15:42:53,934][INFO ][stdout                   ] [ampere03] Wrapped by: java.util.concurrent.ExecutionException: javassist.CannotCompileException: [source error] javassist.NotFoundException: java.lang.Object[]
[inspectit-thread-053]2024-01-29T15:42:53,934][INFO ][stdout                   ] [ampere03]     at com.google.common.util.concurrent.AbstractFuture.getDoneValue(AbstractFuture.java:588)
[inspectit-thread-053]2024-01-29T15:42:53,934][INFO ][stdout                   ] [ampere03]     at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:547)
[inspectit-thread-053]2024-01-29T15:42:53,934][INFO ][stdout                   ] [ampere03]     at com.google.common.util.concurrent.AbstractFuture$TrustedFuture.get(AbstractFuture.java:113)
[inspectit-thread-053]2024-01-29T15:42:53,934][INFO ][stdout                   ] [ampere03]     at com.google.common.util.concurrent.Uninterruptibles.getUninterruptibly(Uninterruptibles.java:240)
[inspectit-thread-053]2024-01-29T15:42:53,934][INFO ][stdout                   ] [ampere03]     at com.google.common.cache.LocalCache$Segment.getAndRecordStats(LocalCache.java:2317)
[inspectit-thread-053]2024-01-29T15:42:53,934][INFO ][stdout                   ] [ampere03]     at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2283)
[inspectit-thread-053]2024-01-29T15:42:53,934][INFO ][stdout                   ] [ampere03]     at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2159)
[inspectit-thread-053]2024-01-29T15:42:53,934][INFO ][stdout                   ] [ampere03]     at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2049)
[inspectit-thread-053]2024-01-29T15:42:53,934][INFO ][stdout                   ] [ampere03]     at com.google.common.cache.LocalCache.get(LocalCache.java:3966)
[inspectit-thread-053]2024-01-29T15:42:53,934][INFO ][stdout                   ] [ampere03]     at com.google.common.cache.LocalCache$LocalManualCache.get(LocalCache.java:4863)
[inspectit-thread-053]2024-01-29T15:42:53,934][INFO ][stdout                   ] [ampere03]     at rocks.inspectit.ocelot.core.instrumentation.actions.GenericActionGenerator.getOrGenerateGenericAction(GenericActionGenerator.java:107)
[inspectit-thread-053]2024-01-29T15:42:53,934][INFO ][stdout                   ] [ampere03]     at rocks.inspectit.ocelot.core.instrumentation.hook.ActionCallGenerator.generateAndBindGenericAction(ActionCallGenerator.java:41)
[inspectit-thread-053]2024-01-29T15:42:53,935][INFO ][stdout                   ] [ampere03]     at rocks.inspectit.ocelot.core.instrumentation.hook.MethodHookGenerator.buildActionCalls(MethodHookGenerator.java:282)
[inspectit-thread-053]2024-01-29T15:42:53,935][INFO ][stdout                   ] [ampere03]     at rocks.inspectit.ocelot.core.instrumentation.hook.MethodHookGenerator.buildHook(MethodHookGenerator.java:103)
[inspectit-thread-053]2024-01-29T15:42:53,935][INFO ][stdout                   ] [ampere03]     at rocks.inspectit.ocelot.core.instrumentation.hook.HookManager$HookUpdate.lambda$addOrReplaceHooks$6(HookManager.java:316)
[inspectit-thread-053]2024-01-29T15:42:53,935][INFO ][stdout                   ] [ampere03]     at java.base/java.util.HashMap.forEach(HashMap.java:1429)
[inspectit-thread-053]2024-01-29T15:42:53,935][INFO ][stdout                   ] [ampere03]     at rocks.inspectit.ocelot.core.instrumentation.hook.HookManager$HookUpdate.addOrReplaceHooks(HookManager.java:307)
[inspectit-thread-053]2024-01-29T15:42:53,935][INFO ][stdout                   ] [ampere03]     at rocks.inspectit.ocelot.core.instrumentation.hook.HookManager$HookUpdate.updateHooksForClass(HookManager.java:246)
[inspectit-thread-053]2024-01-29T15:42:53,935][INFO ][stdout                   ] [ampere03]     at rocks.inspectit.ocelot.core.instrumentation.InstrumentationTriggerer.updateClass(InstrumentationTriggerer.java:261)
[inspectit-thread-053]2024-01-29T15:42:53,935][INFO ][stdout                   ] [ampere03]     at rocks.inspectit.ocelot.core.instrumentation.InstrumentationTriggerer.getBatchOfClassesToRetransform(InstrumentationTriggerer.java:220)
[inspectit-thread-053]2024-01-29T15:42:53,935][INFO ][stdout                   ] [ampere03]     at rocks.inspectit.ocelot.core.instrumentation.InstrumentationTriggerer.checkClassesForConfigurationUpdates(InstrumentationTriggerer.java:148)
[inspectit-thread-053]2024-01-29T15:42:53,935][INFO ][stdout                   ] [ampere03]     at rocks.inspectit.ocelot.core.service.BatchJobExecutorService.lambda$startJob$0(BatchJobExecutorService.java:126)
[inspectit-thread-053]2024-01-29T15:42:53,935][INFO ][stdout                   ] [ampere03]     at rocks.inspectit.ocelot.core.service.BatchJobExecutorService$BatchJob.lambda$new$0(BatchJobExecutorService.java:83)
[inspectit-thread-053]2024-01-29T15:42:53,935][INFO ][stdout                   ] [ampere03]     at rocks.inspectit.ocelot.core.instrumentation.context.ContextManager.lambda$wrap$1(ContextManager.java:76)
[inspectit-thread-053]2024-01-29T15:42:53,935][INFO ][stdout                   ] [ampere03]     at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:577)
[inspectit-thread-053]2024-01-29T15:42:53,936][INFO ][stdout                   ] [ampere03]     at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
[inspectit-thread-053]2024-01-29T15:42:53,936][INFO ][stdout                   ] [ampere03]     at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
[inspectit-thread-053]2024-01-29T15:42:53,936][INFO ][stdout                   ] [ampere03]     at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
[inspectit-thread-053]2024-01-29T15:42:53,936][INFO ][stdout                   ] [ampere03]     at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
[inspectit-thread-053]2024-01-29T15:42:53,936][INFO ][stdout                   ] [ampere03]     at java.base/java.lang.Thread.run(Unknown Source)
[inspectit-thread-053]2024-01-29T15:42:53,937][INFO ][stdout                   ] [ampere03] 2024-01-29 15:42:53,937 ERROR 13226  --- [inspectIT] [pectit-thread-0] r.i.o.c.i.a.GenericActionGenerator       : Error creating generic action 'a_apacheclient_upPropagation' in context of class org.apache.http.impl.client.InternalHttpClient! Using a No-Operation action instead!
[inspectit-thread-053]2024-01-29T15:42:53,938][INFO ][stdout                   ] [ampere03] javassist.compiler.CompileError: javassist.NotFoundException: java.lang.Object[]
[inspectit-thread-053]2024-01-29T15:42:53,938][INFO ][stdout                   ] [ampere03]     at javassist.compiler.Javac.compileBody(Javac.java:234)
[inspectit-thread-053]2024-01-29T15:42:53,938][INFO ][stdout                   ] [ampere03]     at javassist.CtBehavior.setBody(CtBehavior.java:466)
[inspectit-thread-053]2024-01-29T15:42:53,938][INFO ][stdout                   ] [ampere03]     ... 33 common frames omitted
[inspectit-thread-053]2024-01-29T15:42:53,938][INFO ][stdout                   ] [ampere03] Wrapped by: javassist.CannotCompileException: [source error] javassist.NotFoundException: java.lang.Object[]
[inspectit-thread-053]2024-01-29T15:42:53,938][INFO ][stdout                   ] [ampere03]     at javassist.CtBehavior.setBody(CtBehavior.java:474)
[inspectit-thread-053]2024-01-29T15:42:53,938][INFO ][stdout                   ] [ampere03]     at javassist.CtBehavior.setBody(CtBehavior.java:440)
[inspectit-thread-053]2024-01-29T15:42:53,938][INFO ][stdout                   ] [ampere03]     at rocks.inspectit.ocelot.core.instrumentation.actions.GenericActionGenerator.buildGenericActionByteCode(GenericActionGenerator.java:149)
[inspectit-thread-053]2024-01-29T15:42:53,938][INFO ][stdout                   ] [ampere03]     at rocks.inspectit.ocelot.core.instrumentation.actions.GenericActionGenerator.lambda$getOrGenerateGenericAction$0(GenericActionGenerator.java:110)
[inspectit-thread-053]2024-01-29T15:42:53,939][INFO ][stdout                   ] [ampere03]     at rocks.inspectit.ocelot.core.instrumentation.injection.ClassInjector.inject(ClassInjector.java:121)
[inspectit-thread-053]2024-01-29T15:42:53,939][INFO ][stdout                   ] [ampere03]     at rocks.inspectit.ocelot.core.instrumentation.injection.ClassInjector.inject(ClassInjector.java:101)
[inspectit-thread-053]2024-01-29T15:42:53,939][INFO ][stdout                   ] [ampere03]     at rocks.inspectit.ocelot.core.instrumentation.actions.GenericActionGenerator.lambda$getOrGenerateGenericAction$1(GenericActionGenerator.java:109)
[inspectit-thread-053]2024-01-29T15:42:53,939][INFO ][stdout                   ] [ampere03]     at com.google.common.cache.LocalCache$LocalManualCache$1.load(LocalCache.java:4868)
[inspectit-thread-053]2024-01-29T15:42:53,939][INFO ][stdout                   ] [ampere03]     at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3533)
[inspectit-thread-053]2024-01-29T15:42:53,939][INFO ][stdout                   ] [ampere03]     at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2282)
[inspectit-thread-053]2024-01-29T15:42:53,939][INFO ][stdout                   ] [ampere03]     ... 24 common frames omitted
[inspectit-thread-053]2024-01-29T15:42:53,939][INFO ][stdout                   ] [ampere03] Wrapped by: java.util.concurrent.ExecutionException: javassist.CannotCompileException: [source error] javassist.NotFoundException: java.lang.Object[]
[inspectit-thread-053]2024-01-29T15:42:53,939][INFO ][stdout                   ] [ampere03]     at com.google.common.util.concurrent.AbstractFuture.getDoneValue(AbstractFuture.java:588)
[inspectit-thread-053]2024-01-29T15:42:53,939][INFO ][stdout                   ] [ampere03]     at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:547)
[inspectit-thread-053]2024-01-29T15:42:53,939][INFO ][stdout                   ] [ampere03]     at com.google.common.util.concurrent.AbstractFuture$TrustedFuture.get(AbstractFuture.java:113)
[inspectit-thread-053]2024-01-29T15:42:53,939][INFO ][stdout                   ] [ampere03]     at com.google.common.util.concurrent.Uninterruptibles.getUninterruptibly(Uninterruptibles.java:240)
[inspectit-thread-053]2024-01-29T15:42:53,939][INFO ][stdout                   ] [ampere03]     at com.google.common.cache.LocalCache$Segment.getAndRecordStats(LocalCache.java:2317)
[inspectit-thread-053]2024-01-29T15:42:53,939][INFO ][stdout                   ] [ampere03]     at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2283)
[inspectit-thread-053]2024-01-29T15:42:53,940][INFO ][stdout                   ] [ampere03]     at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2159)
[inspectit-thread-053]2024-01-29T15:42:53,940][INFO ][stdout                   ] [ampere03]     at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2049)
[inspectit-thread-053]2024-01-29T15:42:53,940][INFO ][stdout                   ] [ampere03]     at com.google.common.cache.LocalCache.get(LocalCache.java:3966)
[inspectit-thread-053]2024-01-29T15:42:53,940][INFO ][stdout                   ] [ampere03]     at com.google.common.cache.LocalCache$LocalManualCache.get(LocalCache.java:4863)
[inspectit-thread-053]2024-01-29T15:42:53,940][INFO ][stdout                   ] [ampere03]     at rocks.inspectit.ocelot.core.instrumentation.actions.GenericActionGenerator.getOrGenerateGenericAction(GenericActionGenerator.java:107)
[inspectit-thread-053]2024-01-29T15:42:53,940][INFO ][stdout                   ] [ampere03]     at rocks.inspectit.ocelot.core.instrumentation.hook.ActionCallGenerator.generateAndBindGenericAction(ActionCallGenerator.java:41)
[inspectit-thread-053]2024-01-29T15:42:53,940][INFO ][stdout                   ] [ampere03]     at rocks.inspectit.ocelot.core.instrumentation.hook.MethodHookGenerator.buildActionCalls(MethodHookGenerator.java:282)
[inspectit-thread-053]2024-01-29T15:42:53,940][INFO ][stdout                   ] [ampere03]     at rocks.inspectit.ocelot.core.instrumentation.hook.MethodHookGenerator.buildHook(MethodHookGenerator.java:105)
[inspectit-thread-053]2024-01-29T15:42:53,940][INFO ][stdout                   ] [ampere03]     at rocks.inspectit.ocelot.core.instrumentation.hook.HookManager$HookUpdate.lambda$addOrReplaceHooks$6(HookManager.java:316)
[inspectit-thread-053]2024-01-29T15:42:53,940][INFO ][stdout                   ] [ampere03]     at java.base/java.util.HashMap.forEach(HashMap.java:1429)
[inspectit-thread-053]2024-01-29T15:42:53,940][INFO ][stdout                   ] [ampere03]     at rocks.inspectit.ocelot.core.instrumentation.hook.HookManager$HookUpdate.addOrReplaceHooks(HookManager.java:307)
[inspectit-thread-053]2024-01-29T15:42:53,940][INFO ][stdout                   ] [ampere03]     at rocks.inspectit.ocelot.core.instrumentation.hook.HookManager$HookUpdate.updateHooksForClass(HookManager.java:246)
[inspectit-thread-053]2024-01-29T15:42:53,940][INFO ][stdout                   ] [ampere03]     at rocks.inspectit.ocelot.core.instrumentation.InstrumentationTriggerer.updateClass(InstrumentationTriggerer.java:261)
[inspectit-thread-053]2024-01-29T15:42:53,941][INFO ][stdout                   ] [ampere03]     at rocks.inspectit.ocelot.core.instrumentation.InstrumentationTriggerer.getBatchOfClassesToRetransform(InstrumentationTriggerer.java:220)
[inspectit-thread-053]2024-01-29T15:42:53,941][INFO ][stdout                   ] [ampere03]     at rocks.inspectit.ocelot.core.instrumentation.InstrumentationTriggerer.checkClassesForConfigurationUpdates(InstrumentationTriggerer.java:148)
[inspectit-thread-053]2024-01-29T15:42:53,941][INFO ][stdout                   ] [ampere03]     at rocks.inspectit.ocelot.core.service.BatchJobExecutorService.lambda$startJob$0(BatchJobExecutorService.java:126)
[inspectit-thread-053]2024-01-29T15:42:53,941][INFO ][stdout                   ] [ampere03]     at rocks.inspectit.ocelot.core.service.BatchJobExecutorService$BatchJob.lambda$new$0(BatchJobExecutorService.java:83)
[inspectit-thread-053]2024-01-29T15:42:53,941][INFO ][stdout                   ] [ampere03]     at rocks.inspectit.ocelot.core.instrumentation.context.ContextManager.lambda$wrap$1(ContextManager.java:76)
[inspectit-thread-053]2024-01-29T15:42:53,941][INFO ][stdout                   ] [ampere03]     at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:577)
[inspectit-thread-053]2024-01-29T15:42:53,941][INFO ][stdout                   ] [ampere03]     at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
[inspectit-thread-053]2024-01-29T15:42:53,941][INFO ][stdout                   ] [ampere03]     at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
[inspectit-thread-053]2024-01-29T15:42:53,941][INFO ][stdout                   ] [ampere03]     at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
[inspectit-thread-053]2024-01-29T15:42:53,941][INFO ][stdout                   ] [ampere03]     at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
[inspectit-thread-053]2024-01-29T15:42:53,941][INFO ][stdout                   ] [ampere03]     at java.base/java.lang.Thread.run(Unknown Source)
[inspectit-thread-053]2024-01-29T15:42:53,943][INFO ][stdout                   ] [ampere03] 2024-01-29 15:42:53,943 ERROR 13232  --- [inspectIT] [pectit-thread-0] r.i.o.c.i.a.GenericActionGenerator       : Error creating generic action 'a_timing_elapsedMillis' in context of class org.apache.http.impl.client.InternalHttpClient! Using a No-Operation action instead!
[inspectit-thread-053]2024-01-29T15:42:53,943][INFO ][stdout                   ] [ampere03] javassist.compiler.CompileError: javassist.NotFoundException: java.lang.Object[]
[inspectit-thread-053]2024-01-29T15:42:53,943][INFO ][stdout                   ] [ampere03]     at javassist.compiler.Javac.compileBody(Javac.java:234)
[inspectit-thread-053]2024-01-29T15:42:53,943][INFO ][stdout                   ] [ampere03]     at javassist.CtBehavior.setBody(CtBehavior.java:466)
[inspectit-thread-053]2024-01-29T15:42:53,943][INFO ][stdout                   ] [ampere03]     ... 33 common frames omitted
[inspectit-thread-053]2024-01-29T15:42:53,943][INFO ][stdout                   ] [ampere03] Wrapped by: javassist.CannotCompileException: [source error] javassist.NotFoundException: java.lang.Object[]
[inspectit-thread-053]2024-01-29T15:42:53,943][INFO ][stdout                   ] [ampere03]     at javassist.CtBehavior.setBody(CtBehavior.java:474)
[inspectit-thread-053]2024-01-29T15:42:53,944][INFO ][stdout                   ] [ampere03]     at javassist.CtBehavior.setBody(CtBehavior.java:440)
[inspectit-thread-053]2024-01-29T15:42:53,944][INFO ][stdout                   ] [ampere03]     at rocks.inspectit.ocelot.core.instrumentation.actions.GenericActionGenerator.buildGenericActionByteCode(GenericActionGenerator.java:149)
[inspectit-thread-053]2024-01-29T15:42:53,944][INFO ][stdout                   ] [ampere03]     at rocks.inspectit.ocelot.core.instrumentation.actions.GenericActionGenerator.lambda$getOrGenerateGenericAction$0(GenericActionGenerator.java:110)
[inspectit-thread-053]2024-01-29T15:42:53,944][INFO ][stdout                   ] [ampere03]     at rocks.inspectit.ocelot.core.instrumentation.injection.ClassInjector.inject(ClassInjector.java:121)
[inspectit-thread-053]2024-01-29T15:42:53,944][INFO ][stdout                   ] [ampere03]     at rocks.inspectit.ocelot.core.instrumentation.injection.ClassInjector.inject(ClassInjector.java:101)
[inspectit-thread-053]2024-01-29T15:42:53,944][INFO ][stdout                   ] [ampere03]     at rocks.inspectit.ocelot.core.instrumentation.actions.GenericActionGenerator.lambda$getOrGenerateGenericAction$1(GenericActionGenerator.java:109)
[inspectit-thread-053]2024-01-29T15:42:53,944][INFO ][stdout                   ] [ampere03]     at com.google.common.cache.LocalCache$LocalManualCache$1.load(LocalCache.java:4868)
[inspectit-thread-053]2024-01-29T15:42:53,944][INFO ][stdout                   ] [ampere03]     at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3533)
[inspectit-thread-053]2024-01-29T15:42:53,944][INFO ][stdout                   ] [ampere03]     at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2282)
[inspectit-thread-053]2024-01-29T15:42:53,944][INFO ][stdout                   ] [ampere03]     ... 24 common frames omitted
[inspectit-thread-053]2024-01-29T15:42:53,944][INFO ][stdout                   ] [ampere03] Wrapped by: java.util.concurrent.ExecutionException: javassist.CannotCompileException: [source error] javassist.NotFoundException: java.lang.Object[]
[inspectit-thread-053]2024-01-29T15:42:53,944][INFO ][stdout                   ] [ampere03]     at com.google.common.util.concurrent.AbstractFuture.getDoneValue(AbstractFuture.java:588)
[inspectit-thread-053]2024-01-29T15:42:53,944][INFO ][stdout                   ] [ampere03]     at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:547)
[inspectit-thread-053]2024-01-29T15:42:53,944][INFO ][stdout                   ] [ampere03]     at com.google.common.util.concurrent.AbstractFuture$TrustedFuture.get(AbstractFuture.java:113)
[inspectit-thread-053]2024-01-29T15:42:53,945][INFO ][stdout                   ] [ampere03]     at com.google.common.util.concurrent.Uninterruptibles.getUninterruptibly(Uninterruptibles.java:240)
[inspectit-thread-053]2024-01-29T15:42:53,945][INFO ][stdout                   ] [ampere03]     at com.google.common.cache.LocalCache$Segment.getAndRecordStats(LocalCache.java:2317)
[inspectit-thread-053]2024-01-29T15:42:53,945][INFO ][stdout                   ] [ampere03]     at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2283)
[inspectit-thread-053]2024-01-29T15:42:53,945][INFO ][stdout                   ] [ampere03]     at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2159)
[inspectit-thread-053]2024-01-29T15:42:53,945][INFO ][stdout                   ] [ampere03]     at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2049)
[inspectit-thread-053]2024-01-29T15:42:53,945][INFO ][stdout                   ] [ampere03]     at com.google.common.cache.LocalCache.get(LocalCache.java:3966)
[inspectit-thread-053]2024-01-29T15:42:53,945][INFO ][stdout                   ] [ampere03]     at com.google.common.cache.LocalCache$LocalManualCache.get(LocalCache.java:4863)
[inspectit-thread-053]2024-01-29T15:42:53,945][INFO ][stdout                   ] [ampere03]     at rocks.inspectit.ocelot.core.instrumentation.actions.GenericActionGenerator.getOrGenerateGenericAction(GenericActionGenerator.java:107)
[inspectit-thread-053]2024-01-29T15:42:53,945][INFO ][stdout                   ] [ampere03]     at rocks.inspectit.ocelot.core.instrumentation.hook.ActionCallGenerator.generateAndBindGenericAction(ActionCallGenerator.java:41)
[inspectit-thread-053]2024-01-29T15:42:53,945][INFO ][stdout                   ] [ampere03]     at rocks.inspectit.ocelot.core.instrumentation.hook.MethodHookGenerator.buildActionCalls(MethodHookGenerator.java:282)
[inspectit-thread-053]2024-01-29T15:42:53,945][INFO ][stdout                   ] [ampere03]     at rocks.inspectit.ocelot.core.instrumentation.hook.MethodHookGenerator.buildHook(MethodHookGenerator.java:106)
[inspectit-thread-053]2024-01-29T15:42:53,945][INFO ][stdout                   ] [ampere03]     at rocks.inspectit.ocelot.core.instrumentation.hook.HookManager$HookUpdate.lambda$addOrReplaceHooks$6(HookManager.java:316)
[inspectit-thread-053]2024-01-29T15:42:53,945][INFO ][stdout                   ] [ampere03]     at java.base/java.util.HashMap.forEach(HashMap.java:1429)
[inspectit-thread-053]2024-01-29T15:42:53,946][INFO ][stdout                   ] [ampere03]     at rocks.inspectit.ocelot.core.instrumentation.hook.HookManager$HookUpdate.addOrReplaceHooks(HookManager.java:307)
[inspectit-thread-053]2024-01-29T15:42:53,946][INFO ][stdout                   ] [ampere03]     at rocks.inspectit.ocelot.core.instrumentation.hook.HookManager$HookUpdate.updateHooksForClass(HookManager.java:246)
[inspectit-thread-053]2024-01-29T15:42:53,946][INFO ][stdout                   ] [ampere03]     at rocks.inspectit.ocelot.core.instrumentation.InstrumentationTriggerer.updateClass(InstrumentationTriggerer.java:261)
[inspectit-thread-053]2024-01-29T15:42:53,946][INFO ][stdout                   ] [ampere03]     at rocks.inspectit.ocelot.core.instrumentation.InstrumentationTriggerer.getBatchOfClassesToRetransform(InstrumentationTriggerer.java:220)
[inspectit-thread-053]2024-01-29T15:42:53,946][INFO ][stdout                   ] [ampere03]     at rocks.inspectit.ocelot.core.instrumentation.InstrumentationTriggerer.checkClassesForConfigurationUpdates(InstrumentationTriggerer.java:148)
[inspectit-thread-053]2024-01-29T15:42:53,946][INFO ][stdout                   ] [ampere03]     at rocks.inspectit.ocelot.core.service.BatchJobExecutorService.lambda$startJob$0(BatchJobExecutorService.java:126)
[inspectit-thread-053]2024-01-29T15:42:53,946][INFO ][stdout                   ] [ampere03]     at rocks.inspectit.ocelot.core.service.BatchJobExecutorService$BatchJob.lambda$new$0(BatchJobExecutorService.java:83)
[inspectit-thread-053]2024-01-29T15:42:53,946][INFO ][stdout                   ] [ampere03]     at rocks.inspectit.ocelot.core.instrumentation.context.ContextManager.lambda$wrap$1(ContextManager.java:76)
[inspectit-thread-053]2024-01-29T15:42:53,946][INFO ][stdout                   ] [ampere03]     at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:577)
[inspectit-thread-053]2024-01-29T15:42:53,946][INFO ][stdout                   ] [ampere03]     at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
[inspectit-thread-053]2024-01-29T15:42:53,946][INFO ][stdout                   ] [ampere03]     at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
[inspectit-thread-053]2024-01-29T15:42:53,946][INFO ][stdout                   ] [ampere03]     at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
[inspectit-thread-053]2024-01-29T15:42:53,947][INFO ][stdout                   ] [ampere03]     at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
[inspectit-thread-053]2024-01-29T15:42:53,947][INFO ][stdout                   ] [ampere03]     at java.base/java.lang.Thread.run(Unknown Source)

这里需要开启权限并不是配置写错了 需要创建/opt/ocelot.policy

grant codeBase "file:/opt/inspectit-ocelot-agent/inspectit-ocelot-agent-2.5.6.jar" {
    permission java.security.AllPermission;
};

开启这个jar的所有权限否则会爆出各种各样的权限错误

Responses