Skip to content

Commit

Permalink
docs: Dashboard and AWS API Gateway updates (#7469)
Browse files Browse the repository at this point in the history
  • Loading branch information
DaKaZ committed Apr 2, 2020
1 parent 001f56c commit 00f1a28
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 2 deletions.
42 changes: 40 additions & 2 deletions docs/dashboard/monitoring/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,19 @@ Monitoring is enabled by default when you deploy a Service using the Serverless

### Configuration

Serverless Framework will automatically enable log collection by adding a CloudWatch Logs Subscription to send logs that match a particular pattern to our infrastructure for processing. This is used for generating metrics and alerts.
Serverless Framework, when configured to connect to the Serverless Framework Pro Dashboard, will automatically collect three pieces of diagnostics:

- Lambda Log Collection
- AWS Spans
- HTTP Spans

**Lambda Log Collection**

Serverless Framework Pro will enable log collection by adding a CloudWatch Logs Subscription to send logs that match a particular pattern to our infrastructure for processing. This is used for generating metrics and alerts.

When deploying, Serverless Framework will also create an IAM role in your account that allows the Serverless Framework backend to call FilterLogEvents on the CloudWatch Log Groups that are created in the Service being deployed. This is used to display the CloudWatch logs error details views alongside the stack trace.

If you wish to disable log collection, set the following options:
If you wish to disable log collection, set the following option:

**serverless.yml**

Expand All @@ -35,6 +43,36 @@ custom:
collectLambdaLogs: false
```

**AWS Spans**

Serverless Framework Pro will instrument the use of the AWS SDK to show use of AWS services by your Lambda function. This information provides
a valuable visualization of what is happening inside your lambda function, including how long calls to services like DynamoDB, S3 and others are taking.

If you wish to disable AWS Span collection, set fhe following option:

**serverless.yml**

```yaml
custom:
enterprise:
disableAwsSpans: true
```

**HTTP(s) Spans**

Serverless Framework Pro will instrument the use of HTTP(s) by your Lambda function. Much like the AWS Spans, HTTP(s) spans will provide a
visualization of the external communication that your function is invoking, including the duration of those sessions.

If you wish to disable Http Span collection, set fhe following option:

**serverless.yml**

```yaml
custom:
enterprise:
disableHttpSpans: true
```

## Advanced Configuration Options

### Uploading Source Map
Expand Down
15 changes: 15 additions & 0 deletions docs/providers/aws/guide/events.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,21 @@ functions:

The Serverless Framework supports all of the AWS Lambda events and more. Instead of listing them here, we've put them in a separate section, since they have a lot of configurations and functionality. [Check out the events section for more information.](../events)

## PathParameters

HTTP events can be configured to pass in path parameters to your lambda function. [See the API Gateway event for more details.](../events/apigateway.md#request-parameters)

```yml
# 'functions' in serverless.yml
functions:
createUser: # Function name
handler: handler.users # Reference to file handler.js & exported function 'users'
events: # All events associated with this function
- http:
path: users/{id}
method: get
```

## Deploying

To deploy or update your Functions, Events and Infrastructure, run `serverless deploy`.

0 comments on commit 00f1a28

Please sign in to comment.