Skip to content

Commit

Permalink
Merge branch 'master' into refactor-validation
Browse files Browse the repository at this point in the history
  • Loading branch information
vigneshshanmugam authored Mar 11, 2019
2 parents 7400203 + 68b37d8 commit 99de840
Show file tree
Hide file tree
Showing 32 changed files with 4,224 additions and 3,690 deletions.
12 changes: 6 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,27 +38,27 @@ jobs:
- stage: test
env:
- STACK_VERSION=6.5.0
- SCOPE=elastic-apm-js-core
- SCOPE=@elastic/apm-rum-core
- stage: test
env:
- STACK_VERSION=6.5.0
- SCOPE=elastic-apm-js-base
- SCOPE=@elastic/apm-rum
- stage: test
env:
- STACK_VERSION=6.6.0
- SCOPE=elastic-apm-js-core
- SCOPE=@elastic/apm-rum-core
- stage: test
env:
- STACK_VERSION=6.6.0
- SCOPE=elastic-apm-js-base
- SCOPE=@elastic/apm-rum
- stage: test
env:
- STACK_VERSION=7.0.0-alpha1-SNAPSHOT
- SCOPE=elastic-apm-js-core
- SCOPE=@elastic/apm-rum-core
- stage: test
env:
- STACK_VERSION=7.0.0-alpha1-SNAPSHOT
- SCOPE=elastic-apm-js-base
- SCOPE=@elastic/apm-rum

addons:
apt:
Expand Down
10 changes: 5 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ should "Squash and merge".
The project structure follows a monorepo approach, all officially maintained modules are in the same repo. We use [Lerna](https://github.com/lerna/lerna) to achieve the same.

```sh
$ git clone [email protected]:elastic/apm-agent-js-base.git && cd apm-agent-js-base
$ git clone [email protected]:elastic/apm-agent-rum-js.git && cd apm-agent-rum-js
$ npm install
$ npm run bootstrap
```
Expand All @@ -93,20 +93,20 @@ $ npm test
To run tests for a specific package:

```sh
$ SCOPE=elastic-apm-js-base npm test
$ SCOPE=@elastic/apm-rum npm test
```

To run unit/integration/end-to-end tests for packages:

```sh
// Unit tests
$ npx lerna run --scope elastic-apm-js-base runUnitTests
$ npx lerna run --scope @elastic/apm-rum runUnitTests

// Integration tests
$ npx lerna run --scope elastic-apm-js-base runNodeTests
$ npx lerna run --scope @elastic/apm-rum runNodeTests

// End to end tests
$ npx lerna run --scope elastic-apm-js-base run-e2e
$ npx lerna run --scope @elastic/apm-rum run-e2e
```

### Linting
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Elastic APM Real User Monitoring (RUM) JavaScript agent

[![Build status](https://travis-ci.org/elastic/apm-agent-js-base.svg?branch=master)](https://travis-ci.org/elastic/apm-agent-js-base)
[![Build status](https://travis-ci.org/elastic/apm-agent-rum-js.svg?branch=master)](https://travis-ci.org/elastic/apm-agent-rum-js)
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://github.com/feross/standard)
[![lerna](https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg)](https://lernajs.io/)

Expand Down
4 changes: 2 additions & 2 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ To publish all the packages run `npm run release`. It will run `lerna publish`(w

### Releasing single package

To publish a single package, run `npm run release-package -- elastic-apm-js-base` which uses `lerna publish` under the hood to publish single package to NPM
To publish a single package, run `npm run release-package -- @elastic/apm-rum` which uses `lerna publish` under the hood to publish single package to NPM

### Releasing artifacts to GitHub

Use `npm run release-github` in the root directory, the script takes care of building, testing the `elastic-apm-js-base` package and creating a release in GitHub with the previous annonated tag.
Use `npm run release-github` in the root directory, the script takes care of building, testing the `@elastic/apm-rum` package and creating a release in GitHub with the previous annonated tag.

**Note: Make sure you pass the GITHUB_TOKEN (with push access) in your environment variable while releasing**
2 changes: 1 addition & 1 deletion dev-utils/karma.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const { Server } = require('karma')
const { EnvironmentPlugin } = require('webpack')
const { getWebpackEnv, getSauceConnectOptions } = require('./test-config')

const BABEL_CONFIG_FILE = require.resolve('elastic-apm-js-base/babel.config.js')
const BABEL_CONFIG_FILE = require.resolve('@elastic/apm-rum/babel.config.js')

const baseLaunchers = {
SL_CHROME: {
Expand Down
3 changes: 2 additions & 1 deletion dev-utils/test-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,9 @@ function getGlobalConfig(packageName = 'rum') {
* Used for injecting process.env across webpack bundles for testing
*/
function getWebpackEnv() {
const { serverUrl } = getTestEnvironmentVariables()
return {
APM_SERVER_URL: defaultApmServerUrl
APM_SERVER_URL: serverUrl
}
}

Expand Down
2 changes: 1 addition & 1 deletion docs/api.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ You can access agent API after initializing the agent:

[source,js]
----
var apm = require('elastic-apm-js-base').init(...)
var apm = require('@elastic/apm-rum').init(...)
----


Expand Down
2 changes: 1 addition & 1 deletion docs/custom-transactions.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Here is an example application using custom transactions:

[source,js]
----
import { init as initApm } from 'elastic-apm-js-base'
import { init as initApm } from '@elastic/apm-rum'
var apm = initApm({
serviceName: 'service-name',
serverUrl: 'http://localhost:8200'
Expand Down
10 changes: 5 additions & 5 deletions docs/intro.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ Install the APM agent for JavaScript as a dependency to your application:

[source,bash]
----
npm install elastic-apm-js-base --save
npm install @elastic/apm-rum --save
----

Configure the agent:

[source,js]
----
import { init as initApm } from 'elastic-apm-js-base'
import { init as initApm } from '@elastic/apm-rum'
const apm = initApm({
// Set required service name (allowed characters: a-z, A-Z, 0-9, -, _, and space)
Expand All @@ -54,12 +54,12 @@ const apm = initApm({

Add a <script> tag to the HTML page and use the `elasticApm` global object to load and initialize the agent:

NOTE: Please download the latest version of JavaScript agent from https://github.com/elastic/apm-agent-js-base/releases/latest[GitHub] or
https://unpkg.com/elastic-apm-js-base/dist/bundles/elastic-apm-js-base.umd.min.js[UNPKG] and host the file in your Server/CDN before deploying to production.
NOTE: Please download the latest version of JavaScript agent from https://github.com/elastic/apm-agent-rum-js/releases/latest[GitHub] or
https://unpkg.com/@elastic/apm-rum/dist/bundles/elastic-apm-rum.umd.min.js[UNPKG] and host the file in your Server/CDN before deploying to production.

[source,html]
----
<script src="https://your-cdn-host.com/path/to/elastic-apm-js-base.umd.min.js" crossorigin></script>
<script src="https://your-cdn-host.com/path/to/elastic-apm-rum.umd.min.js" crossorigin></script>
<script>
elasticApm.init({
serviceName: '',
Expand Down
4 changes: 2 additions & 2 deletions docs/opentracing.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ In order to use OpenTracing API with Elastic APM, you need to first create a Tra

[source,js]
----
const { init: initApm, createTracer } = require('elastic-apm-js-base/dist/bundles/elastic-apm-opentracing.umd.js')
const { init: initApm, createTracer } = require('@elastic/apm-rum/dist/bundles/elastic-apm-opentracing.umd.js')
const elasticApm = initApm({
// ...
})
Expand All @@ -39,7 +39,7 @@ Please refer to https://github.com/opentracing/opentracing-javascript/[opentraci
on OpenTracing API.

NOTE: If you are loading the RUM agent using a script tag, please make sure to use our OpenTracing bundle
(`elastic-apm-js-base/dist/bundles/elastic-apm-opentracing.umd.js`) in your scripts instead, then you can create a tracer
(`@elastic/apm-rum/dist/bundles/elastic-apm-opentracing.umd.js`) in your scripts instead, then you can create a tracer
using `window.elasticApm.createTracer()`.


Expand Down
2 changes: 1 addition & 1 deletion docs/sourcemap.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Then you can use the provided service version to set the "serviceVersion" config

[source,js]
----
import { init as initApm } from 'elastic-apm-js-base'
import { init as initApm } from '@elastic/apm-rum'
var apm = initApm({
// Set required service name
serviceName: 'service-name',
Expand Down
2 changes: 1 addition & 1 deletion docs/troubleshooting.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,5 @@ In order to debug the agent consider performing the following steps:

If you have any questions, please create a new topic in the https://discuss.elastic.co/c/apm[Elastic APM discuss forum].

For bug reports and feature requests, please https://github.com/elastic/apm-agent-js-base/issues/new[create an issue] on our https://github.com/elastic/apm-agent-js-base[github repo]
For bug reports and feature requests, please https://github.com/elastic/apm-agent-rum-js/issues/new[create an issue] on our https://github.com/elastic/apm-agent-rum-js[github repo]
and include as much information as possible. See <<debugging, Debugging>> for how to gather debugging information.
Loading

0 comments on commit 99de840

Please sign in to comment.