rickbansal-mulesoft / otel-mule4-observability-agent

12 stars 6 forks source link

Message Processor Span Bypass #8

Closed shilpamallya closed 1 year ago

shilpamallya commented 1 year ago

Hi Team - I want to filter the trace logs related to the health check endpoint of a mule app. I followed the agent configuration step 9 to mute individual message processors following this guide (https://htmlpreview.github.io/?https://github.com/rickbansal-mulesoft/otel-mule4-observability-agent/blob/main/target/generated-docs/README.html#_agent_configuration)

Screenshot 2023-03-24 131314

However, the app fails during runtime with the below error.

Caused by: org.mule.runtime.module.extension.internal.runtime.exception.RequiredParameterNotSetException: Parameter 'name' is required but was not found ERROR 2023-03-24 13:23:46,238+11:00 [WrapperListener_start_runner] org.mule.runtime.module.deployment.impl.internal.application.DefaultMuleApplication: Error creating bean with name 'OpenTelemetry_Mule_4_Observablity_Agent_Config': Cannot create inner bean '(inner bean)#174aa35e' of type [java.util.ArrayList] while setting bean property 'parameters' with key [<<bypassComponents>>]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#174aa35e': Cannot create inner bean '(inner bean)#2257f1bf' of type [org.mule.runtime.module.extension.internal.config.dsl.parameter.TopLevelParameterObjectFactory$$EnhancerByCGLIB$$56b31a01] while setting constructor argument with key [0]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#2257f1bf': FactoryBean threw exception on object creation; nested exception is org.mule.runtime.core.api.config.ConfigurationException: Element <otel-mule4-observablity-agent:mule-component> in line 65 of file is missing required parameter 'name' org.mule.runtime.module.extension.internal.runtime.exception.RequiredParameterNotSetException: Parameter 'name' is required but was not found

Would you please be able to guide me on how I can go about resolving it?

Thanks!

rickbansal-mulesoft commented 1 year ago

Hello, the feature is designed to mute (suppress) traces generated by specific types of message processors (e.g., logger, http request, transform, ...). If your intention was to mute traces by HTTP Request processor then you need to set the following:
namespace: http name: request

In your example, the name is being set to "requester" which is not the correct name for that processor.