-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add csharp handler and test * remove unused line in gitignore
- Loading branch information
Showing
7 changed files
with
105 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[log] {"message":{"message":"START XXX"}} | ||
[log] {"message":{"message":"XXX Log 0 XXX\n","lambda":{"arn":"arn:aws:lambda:sa-east-1:601427279990:function:integration-tests-extension-STAGE-log-csharp"}},"status":"info","timestamp":TIMESTAMP,"hostname":"arn:aws:lambda:sa-east-1:601427279990:function:integration-tests-extension-STAGE-log-csharp","service":"integration-tests-service","ddsource":"lambda","ddtags":"account_id:601427279990,account_id:601427279990,account_id:601427279990,architecture:x86_64,architecture:x86_64,architecture:x86_64,aws_account:601427279990,aws_account:601427279990,aws_account:601427279990,dd_extension_version:123,dd_extension_version:123,dd_extension_version:123,env:integration-tests-env,env:integration-tests-env,env:integration-tests-env,function_arn:arn:aws:lambda:sa-east-1:601427279990:function:integration-tests-extension-STAGE-log-csharp,function_arn:arn:aws:lambda:sa-east-1:601427279990:function:integration-tests-extension-STAGE-log-csharp,function_arn:arn:aws:lambda:sa-east-1:601427279990:function:integration-tests-extension-STAGE-log-csharp,functionname:integration-tests-extension-STAGE-log-csharp,functionname:integration-tests-extension-STAGE-log-csharp,functionname:integration-tests-extension-STAGE-log-csharp,memorysize:1024,memorysize:1024,memorysize:1024,region:sa-east-1,region:sa-east-1,region:sa-east-1,resource:integration-tests-extension-STAGE-log-csharp,resource:integration-tests-extension-STAGE-log-csharp,resource:integration-tests-extension-STAGE-log-csharp,service:integration-tests-service,service:integration-tests-service,service:integration-tests-service,taga:valuea,taga:valuea,taga:valuea,tagb:valueb,tagb:valueb,tagb:valueb,tagc:valuec,tagc:valuec,tagc:valuec,tagd:valued,tagd:valued,tagd:valued,version:integration-tests-version,version:integration-tests-version,version:integration-tests-version"} | ||
[log] {"message":{"message":"XXX Log 1 XXX\n","lambda":{"arn":"arn:aws:lambda:sa-east-1:601427279990:function:integration-tests-extension-STAGE-log-csharp"}},"status":"info","timestamp":TIMESTAMP,"hostname":"arn:aws:lambda:sa-east-1:601427279990:function:integration-tests-extension-STAGE-log-csharp","service":"integration-tests-service","ddsource":"lambda","ddtags":"account_id:601427279990,account_id:601427279990,account_id:601427279990,architecture:x86_64,architecture:x86_64,architecture:x86_64,aws_account:601427279990,aws_account:601427279990,aws_account:601427279990,dd_extension_version:123,dd_extension_version:123,dd_extension_version:123,env:integration-tests-env,env:integration-tests-env,env:integration-tests-env,function_arn:arn:aws:lambda:sa-east-1:601427279990:function:integration-tests-extension-STAGE-log-csharp,function_arn:arn:aws:lambda:sa-east-1:601427279990:function:integration-tests-extension-STAGE-log-csharp,function_arn:arn:aws:lambda:sa-east-1:601427279990:function:integration-tests-extension-STAGE-log-csharp,functionname:integration-tests-extension-STAGE-log-csharp,functionname:integration-tests-extension-STAGE-log-csharp,functionname:integration-tests-extension-STAGE-log-csharp,memorysize:1024,memorysize:1024,memorysize:1024,region:sa-east-1,region:sa-east-1,region:sa-east-1,resource:integration-tests-extension-STAGE-log-csharp,resource:integration-tests-extension-STAGE-log-csharp,resource:integration-tests-extension-STAGE-log-csharp,service:integration-tests-service,service:integration-tests-service,service:integration-tests-service,taga:valuea,taga:valuea,taga:valuea,tagb:valueb,tagb:valueb,tagb:valueb,tagc:valuec,tagc:valuec,tagc:valuec,tagd:valued,tagd:valued,tagd:valued,version:integration-tests-version,version:integration-tests-version,version:integration-tests-version"} | ||
[log] {"message":{"message":"XXX Log 2 XXX\n","lambda":{"arn":"arn:aws:lambda:sa-east-1:601427279990:function:integration-tests-extension-STAGE-log-csharp"}},"status":"info","timestamp":TIMESTAMP,"hostname":"arn:aws:lambda:sa-east-1:601427279990:function:integration-tests-extension-STAGE-log-csharp","service":"integration-tests-service","ddsource":"lambda","ddtags":"account_id:601427279990,account_id:601427279990,account_id:601427279990,architecture:x86_64,architecture:x86_64,architecture:x86_64,aws_account:601427279990,aws_account:601427279990,aws_account:601427279990,dd_extension_version:123,dd_extension_version:123,dd_extension_version:123,env:integration-tests-env,env:integration-tests-env,env:integration-tests-env,function_arn:arn:aws:lambda:sa-east-1:601427279990:function:integration-tests-extension-STAGE-log-csharp,function_arn:arn:aws:lambda:sa-east-1:601427279990:function:integration-tests-extension-STAGE-log-csharp,function_arn:arn:aws:lambda:sa-east-1:601427279990:function:integration-tests-extension-STAGE-log-csharp,functionname:integration-tests-extension-STAGE-log-csharp,functionname:integration-tests-extension-STAGE-log-csharp,functionname:integration-tests-extension-STAGE-log-csharp,memorysize:1024,memorysize:1024,memorysize:1024,region:sa-east-1,region:sa-east-1,region:sa-east-1,resource:integration-tests-extension-STAGE-log-csharp,resource:integration-tests-extension-STAGE-log-csharp,resource:integration-tests-extension-STAGE-log-csharp,service:integration-tests-service,service:integration-tests-service,service:integration-tests-service,taga:valuea,taga:valuea,taga:valuea,tagb:valueb,tagb:valueb,tagb:valueb,tagc:valuec,tagc:valuec,tagc:valuec,tagd:valued,tagd:valued,tagd:valued,version:integration-tests-version,version:integration-tests-version,version:integration-tests-version"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[sketch] {"metric":"aws.lambda.enhanced.runtime_duration","distributions":null,"tags":["account_id:601427279990","architecture:x86_64","aws_account:601427279990","cold_start:true","dd_extension_version:123","env:integration-tests-env","function_arn:arn:aws:lambda:sa-east-1:601427279990:function:integration-tests-extension-XXXXXX-metric-csharp","functionname:integration-tests-extension-XXXXXX-metric-csharp","memorysize:1024","region:sa-east-1","resource:integration-tests-extension-XXXXXX-metric-csharp","service:integration-tests-service","taga:valuea","tagb:valueb","tagc:valuec","tagd:valued","version:integration-tests-version"],"dogsketches":[{"ts":XXX,"cnt":1,"min":XXX,"max":XXX,"avg":XXX,"sum":XXX,"k":[XXX],"n":[1]}]} | ||
[sketch] {"metric":"aws.lambda.enhanced.runtime_duration","distributions":null,"tags":["account_id:601427279990","architecture:x86_64","aws_account:601427279990","cold_start:true","dd_extension_version:123","env:integration-tests-env","function_arn:arn:aws:lambda:sa-east-1:601427279990:function:integration-tests-extension-XXXXXX-metric-csharp","functionname:integration-tests-extension-XXXXXX-metric-csharp","memorysize:1024","region:sa-east-1","resource:integration-tests-extension-XXXXXX-metric-csharp","service:integration-tests-service","taga:valuea","tagb:valueb","tagc:valuec","tagd:valued","version:integration-tests-version"],"dogsketches":[{"ts":XXX,"cnt":1,"min":XXX,"max":XXX,"avg":XXX,"sum":XXX,"k":[XXX],"n":[1]}]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>netcoreapp3.1</TargetFramework> | ||
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles> | ||
<AssemblyName>CsharpHandlers</AssemblyName> | ||
<PackageId>aws-csharp</PackageId> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Amazon.Lambda.Core" Version="1.1.0" /> | ||
<PackageReference Include="Amazon.Lambda.Serialization.SystemTextJson" Version="2.0.1" /> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
using Amazon.Lambda.Core; | ||
using System; | ||
|
||
[assembly:LambdaSerializer(typeof(Amazon.Lambda.Serialization.SystemTextJson.DefaultLambdaJsonSerializer))] | ||
namespace AwsDotnetCsharp | ||
|
||
{ | ||
public class Handler | ||
{ | ||
public Response Hello() | ||
{ | ||
return new Response(200, "ok"); | ||
} | ||
|
||
public Response Logs() | ||
{ | ||
Console.WriteLine("XXX Log 0 XXX"); | ||
Console.WriteLine("XXX Log 1 XXX"); | ||
Console.WriteLine("XXX Log 2 XXX"); | ||
return new Response(200, "ok"); | ||
} | ||
} | ||
public class Response | ||
{ | ||
public int statusCode {get; set;} | ||
public string body {get; set;} | ||
|
||
public Response(int code, string message){ | ||
statusCode = code; | ||
body = message; | ||
} | ||
} | ||
|
||
} |