Skip to content

Commit 0719c77

Browse files
Merge pull request #76 from logicmonitor/develop
Develop to master
2 parents 4a7006c + d7125bf commit 0719c77

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

package/lm-logs-azure.zip

4 Bytes
Binary file not shown.

src/main/java/com/logicmonitor/logs/azure/LogEventAdapter.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ public class LogEventAdapter implements Function<String, List<LogEntry>> {
103103
public static final String LM_TENANT_ID = "LM_TENANT_ID";
104104

105105
public static final String RESOURCE_TYPE_KEY = "RESOURCE_TYPE";
106+
public static final String RESOURCE_TYPE_FIELD = "_resource.type";
106107
public static final String LM_TENANT_ID_KEY = "_lm.tenantId";
107108

108109
public static final Pattern RESOURCE_TYPE = Pattern.compile("/subscriptions/.*/resourceGroups/.*/providers/(?<type>[^/]*/[^/]*)/.*", Pattern.CASE_INSENSITIVE);
@@ -255,7 +256,7 @@ protected LogEntry createEntry(JsonObject json) {
255256

256257
String resourceType = System.getenv(RESOURCE_TYPE_KEY);
257258
if(StringUtils.isNotBlank(resourceType)){
258-
metadata.put(RESOURCE_TYPE_KEY.toLowerCase(), resourceType);
259+
metadata.put(RESOURCE_TYPE_FIELD, resourceType);
259260
}
260261

261262
entry.setMetadata(metadata);

0 commit comments

Comments
 (0)