@@ -168,7 +168,6 @@ type ContainerState struct {
168168// InstrumentContainer instruments a specific Docker container
169169func (do * DockerOperations ) InstrumentContainer (containerName string , cfg * config.ProcessConfiguration ) error {
170170 // Discover the container
171- pp .Println ("Container name: " , containerName )
172171 container , err := do .discoverer .GetContainerByName (containerName )
173172 if err != nil {
174173 return fmt .Errorf ("container not found: %w" , err )
@@ -181,7 +180,6 @@ func (do *DockerOperations) InstrumentContainer(containerName string, cfg *confi
181180
182181 // Determine instrumentation strategy
183182 if container .IsCompose {
184- pp .Println ("Compose container" )
185183 if container .IsJava {
186184 return do .instrumentComposeContainer (container , cfg )
187185 } else if container .IsNodeJS {
@@ -442,7 +440,6 @@ func (do *DockerOperations) instrumentComposeNodeContainer(
442440 if container .ComposeFile == "" {
443441 return fmt .Errorf ("compose file not found for container %s" , container .ContainerName )
444442 }
445- pp .Println ("Compose File for node: " , container .ComposeFile )
446443 modifier := NewComposeModifier (container .ComposeFile )
447444
448445 // Step 1: Validate compose file
@@ -883,7 +880,6 @@ func (do *DockerOperations) buildDockerRunCommand(config map[string]interface{},
883880
884881// runContainer runs a docker run command
885882func (do * DockerOperations ) runContainer (command string ) error {
886- pp .Println ("Running the docker command: " , command )
887883 cmd := exec .CommandContext (do .ctx , "sh" , "-c" , command )
888884 return cmd .Run ()
889885}
@@ -918,7 +914,6 @@ func (do *DockerOperations) modifyComposeFile(container *discovery.DockerContain
918914
919915 // Add instrumentation to service
920916 if container .IsNodeJS {
921- pp .Println ("Service: " , service )
922917 if err := modifier .addNodeInstrumentation (& service , cfg , do .hostAgentPath ); err != nil {
923918 return fmt .Errorf ("failed to add instrumentation: %w" , err )
924919 }
@@ -928,7 +923,6 @@ func (do *DockerOperations) modifyComposeFile(container *discovery.DockerContain
928923
929924 // Update the service in the compose data
930925 composeData .Services [container .ComposeService ] = service
931- pp .Println ("compose Data, " , composeData )
932926
933927 // Write the modified compose file
934928 if err := modifier .Write (composeData ); err != nil {
@@ -967,10 +961,6 @@ func (cm *ComposeModifier) Write(composeFile *ComposeFile) error {
967961 return fmt .Errorf ("failed to marshal YAML: %w" , err )
968962 }
969963
970- pp .Println ("=== MODIFIED COMPOSE FILE CONTENT ===" )
971- pp .Println (string (data ))
972- pp .Println ("=== END MODIFIED CONTENT ===" )
973-
974964 // Write to file
975965 if err := os .WriteFile (cm .filePath , data , 0o644 ); err != nil {
976966 return fmt .Errorf ("failed to write file: %w" , err )
@@ -1089,8 +1079,6 @@ func (cm *ComposeModifier) addNodeInstrumentation(
10891079 hostAgentPath string ,
10901080) error {
10911081 cfg .MWServiceName = ""
1092- pp .Println ("----------------------------------------------------------" )
1093- pp .Println ("cfg: OTEL SERVICE NAME: " , cfg .OtelServiceName )
10941082 mwEnv := cfg .ToEnvironmentVariables ()
10951083 nodeOptions := fmt .Sprintf ("NODE_OPTIONS=--import ${PWD}/autoinstrumentation/mw-register.js" )
10961084
0 commit comments