{"record":{"id":"ff5cbc5496564bfd","repo":"pinpoint-apm/pinpoint","slug":"apikey","errorCode":null,"errorMessage":"- apikey: {}","messagePattern":"- apikey: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"info","filePath":"agent-module/profiler/src/main/java/com/navercorp/pinpoint/profiler/DefaultAgent.java","lineNumber":143,"sourceCode":"        return AgentContextOptionBuilder.build(agentOption, objectName, profilerConfig);\n    }\n\n    private AgentSystemConfig agentSystemConfig(ObjectName objectName) {\n        AgentSystemConfig agentSystemConfig = new AgentSystemConfig(objectName.getAgentId(), Version.VERSION);\n        agentSystemConfig.dump(System.getProperties());\n        return agentSystemConfig;\n    }\n\n    private void dumpAgentOption(AgentContextOption agentOption) {\n        final ObjectName objectName = agentOption.getObjectName();\n        logger.warn(\"AgentOption : {}\", objectName.getClass().getSimpleName());\n        logger.warn(\"- agentId: {}\", objectName.getAgentId());\n        logger.warn(\"- agentName: {}\", objectName.getAgentName());\n        logger.warn(\"- applicationName: {}\", objectName.getApplicationName());\n        if (objectName instanceof ObjectNameV4) {\n            ObjectNameV4 v4 = (ObjectNameV4) objectName;\n            logger.warn(\"- serviceName: {}\", objectName.getServiceName());\n            logger.warn(\"- apikey: {}\", MaskUtils.masking(v4.getApiKey(), 2));\n        }\n        logger.info(\"- instrumentation: {}\", agentOption.getInstrumentation());\n    }\n\n\n    private LoggingSystem newLoggingSystem(Path agentPath) {\n        return Log4j2LoggingSystem.searchPath(agentPath);\n    }\n\n    protected ApplicationContext newApplicationContext(AgentContextOption agentOption) {\n        Objects.requireNonNull(agentOption, \"agentOption\");\n        ProfilerConfig profilerConfig = Objects.requireNonNull(agentOption.getProfilerConfig(), \"profilerConfig\");\n\n        String factoryClazzName = getInjectionModuleFactoryClazzName(profilerConfig);\n        ModuleFactoryResolver moduleFactoryResolver = new DefaultModuleFactoryResolver(factoryClazzName);\n        ModuleFactory moduleFactory = moduleFactoryResolver.resolve();\n        return new DefaultApplicationContext(agentOption, moduleFactory);\n    }","sourceCodeStart":125,"sourceCodeEnd":161,"githubUrl":"https://github.com/pinpoint-apm/pinpoint/blob/744c3d3075e595656abb1ae331ad2c0e4c9eb996/agent-module/profiler/src/main/java/com/navercorp/pinpoint/profiler/DefaultAgent.java#L125-L161","documentation":"WARN log line printing the ObjectNameV4 apikey, deliberately masked via MaskUtils.masking(apiKey, 2) so only the first characters are visible. Informational; confirms an apikey was loaded without leaking the secret.","triggerScenarios":"Agent startup when ObjectNameV4 is used and an apikey is configured; always printed masked in the option dump.","commonSituations":"Verifying an apikey was actually picked up (fully masked output still proves presence); auditing logs to confirm secrets are not printed in clear.","solutions":["No action needed; the key is masked by design.","If the apikey appears null/short, check the credential file/config supplying the apikey.","Never replace this logging with unmasked output; keep secrets out of logs."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":["Expect the apikey to appear masked in logs; investigate only if absent/short.","Keep apikeys in credential files/config, never in plaintext command lines."],"tags":["logging","secrets","masking","multi-tenancy"],"backgroundTag":null,"analyzedSha":"744c3d3075e595656abb1ae331ad2c0e4c9eb996","analyzedAt":"2026-09-07T18:48:45.289Z","contentChangedAt":"2026-09-07T18:48:45.289Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}