Skip to content

Commit 48b088c

Browse files
author
Pankaj Agrawal
committed
Real example of namespace in sample app
1 parent b1b516f commit 48b088c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

example/HelloWorldFunction/src/main/java/helloworld/App.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public class App implements RequestHandler<APIGatewayProxyRequestEvent, APIGatew
3838

3939
@PowertoolsLogging(logEvent = true, samplingRate = 0.7)
4040
@PowertoolsTracing(captureError = false, captureResponse = false)
41-
@PowertoolsMetrics(namespace = "EMF", captureColdStart = true)
41+
@PowertoolsMetrics(namespace = "ServerlessAirline", service = "payment", captureColdStart = true)
4242
public APIGatewayProxyResponseEvent handleRequest(final APIGatewayProxyRequestEvent input, final Context context) {
4343
Map<String, String> headers = new HashMap<>();
4444

example/HelloWorldFunction/src/main/java/helloworld/AppStream.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public class AppStream implements RequestStreamHandler {
1616

1717
@Override
1818
@PowertoolsLogging(logEvent = true)
19-
@PowertoolsMetrics(namespace = "EMF", captureColdStart = true)
19+
@PowertoolsMetrics(namespace = "ServerlessAirline", service = "payment", captureColdStart = true)
2020
public void handleRequest(InputStream input, OutputStream output, Context context) throws IOException {
2121
Map map = mapper.readValue(input, Map.class);
2222

0 commit comments

Comments
 (0)