- 
                Notifications
    
You must be signed in to change notification settings  - Fork 536
 
Docs: WIP V2/6.5 additions and changes #1530
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
          
     Merged
      
      
    
  
     Merged
                    Changes from 7 commits
      Commits
    
    
            Show all changes
          
          
            13 commits
          
        
        Select commit
          Hold shift + click to select a range
      
      c17bb5e
              
                docs: rework apm overview
              
              
                bmorelli25 39c7472
              
                docs: move events and add distributed tracing
              
              
                bmorelli25 c632c8c
              
                docs: add more v2 and change layout
              
              
                bmorelli25 d79b392
              
                docs: more v2 additions
              
              
                bmorelli25 5e99ca5
              
                Merge branch 'docs-v2-updates' into 1484-doc-intake-api
              
              
                bmorelli25 eb5a74b
              
                docs: rework apm overview
              
              
                bmorelli25 592f15e
              
                docs: more v2
              
              
                bmorelli25 8312f9a
              
                docs: review improvements and fix compat
              
              
                bmorelli25 1fed7ab
              
                docs: v2 revisions and fixes
              
              
                bmorelli25 c212c33
              
                Update example files for official docs. (#2)
              
              
                simitt a54db05
              
                docs: update structure and config
              
              
                bmorelli25 97420d3
              
                docs: add redirects file
              
              
                bmorelli25 dd62bce
              
                docs: fix agent server compat
              
              
                bmorelli25 File filter
Filter by extension
Conversations
          Failed to load comments.   
        
        
          
      Loading
        
  Jump to
        
          Jump to file
        
      
      
          Failed to load files.   
        
        
          
      Loading
        
  Diff view
Diff view
There are no files selected for viewing
  
    
      This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 was deleted.
      
      Oops, something went wrong.
      
    
  This file was deleted.
      
      Oops, something went wrong.
      
    
  
  
    
      This file contains hidden or 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,93 @@ | ||
| [[events-api]] | ||
| == Events API | ||
| 
     | 
||
| Agents capture different types of information, known as events. | ||
| These events are sent to a single endpoint which then sorts and processes the events. | ||
| Events can be: | ||
| 
     | 
||
| * Transactions | ||
| * Spans | ||
| * Errors | ||
| * Metricsets | ||
| 
     | 
||
| You can learn more about events in the {apm-get-started-ref}/apm-data-model.html[APM Data Model] documentation. | ||
| 
     | 
||
| [[events-api-endpoint]] | ||
| [float] | ||
| === Endpoint | ||
                
      
                  bmorelli25 marked this conversation as resolved.
               
          
            Show resolved
            Hide resolved
         | 
||
| Send an `HTTP POST` request to the APM Server `intake/v2/events` endpoint: | ||
| 
     | 
||
| [source,bash] | ||
| ------------------------------------------------------------ | ||
| http(s)://{hostname}:{port}/intake/v2/events | ||
| ------------------------------------------------------------ | ||
| 
     | 
||
| For <<rum, RUM>> send an `HTTP POST` request to the APM Server `intake/v2/rum/events` endpoint instead: | ||
| 
     | 
||
| [source,bash] | ||
| ------------------------------------------------------------ | ||
| http(s)://{hostname}:{port}/intake/v2/rum/events | ||
| ------------------------------------------------------------ | ||
| 
     | 
||
| [[events-api-response]] | ||
| [float] | ||
| === Response | ||
| 
     | 
||
| On success, the server will respond with a 202 Accepted status code and no body. | ||
                
      
                  bmorelli25 marked this conversation as resolved.
               
          
            Show resolved
            Hide resolved
         | 
||
| 
     | 
||
| [[events-api-errors]] | ||
| [float] | ||
| === Errors | ||
                
      
                  bmorelli25 marked this conversation as resolved.
               
              
                Outdated
          
            Show resolved
            Hide resolved
         | 
||
| 
     | 
||
| Events are processed one after the either. | ||
                
      
                  bmorelli25 marked this conversation as resolved.
               
              
                Outdated
          
            Show resolved
            Hide resolved
         | 
||
| If an error is encountered while processing an event, | ||
| the error encountered as well as the document causing the error are added to an internal array. | ||
| The server will wait to encounter up to five errors before sending a response to the agent. | ||
                
      
                  bmorelli25 marked this conversation as resolved.
               
              
                Outdated
          
            Show resolved
            Hide resolved
         | 
||
| If there are multiple errors, the highest status code is returned. | ||
                
      
                  bmorelli25 marked this conversation as resolved.
               
              
                Outdated
          
            Show resolved
            Hide resolved
         | 
||
| 
     | 
||
| Here's an example response: | ||
| 
     | 
||
| [source,json] | ||
| ------------------------------------------------------------ | ||
| { | ||
| "errors": [ | ||
| { | ||
| "message": "queue is full" | ||
| },{ | ||
| "message": "timeout while waiting to process" | ||
| },{ | ||
| "message": "<json-schema-err>", | ||
| "document": "<ndjson-obj>" | ||
| },{ | ||
| "message": "<json-decoding-err>", | ||
| "document": "<ndjson-obj>" | ||
| },{ | ||
| "message": "invalid content-type: 'html/text'" | ||
| } | ||
| ], | ||
| "accepted": 2320 | ||
| } | ||
                
      
                  bmorelli25 marked this conversation as resolved.
               
          
            Show resolved
            Hide resolved
         | 
||
| ------------------------------------------------------------ | ||
| 
     | 
||
| Some errors, not relating to specific events, may be immediately returnable. | ||
                
      
                  bmorelli25 marked this conversation as resolved.
               
              
                Outdated
          
            Show resolved
            Hide resolved
         | 
||
| For example: Request limit reached, bad header, or internal queue full. | ||
| If at any point one of these errors is encountered, | ||
| it is added to the internal array and immediately returned. | ||
| 
     | 
||
| If you're developing an agent, these errors can be useful for debugging your agent while building it. | ||
| 
     | 
||
| [[events-api-schema-definition]] | ||
| [float] | ||
| === Event API Schemas | ||
| 
     | 
||
| The APM Server uses a collection of JSON Schemas for validating requests to the intake API: | ||
| 
     | 
||
| * <<metadata-api, Metadata>> | ||
| * <<transaction-api, Transactions and Spans>> | ||
| * <<error-api, Errors>> | ||
| * <<metricset-api, Metricsets>> | ||
| 
     | 
||
| include::./metadata-api.asciidoc[] | ||
| include::./transaction-api.asciidoc[] | ||
| include::./error-api.asciidoc[] | ||
| include::./metricset-api.asciidoc[] | ||
      
      Oops, something went wrong.
        
    
  
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
Uh oh!
There was an error while loading. Please reload this page.