Skip to content

Commit

Permalink
Merge pull request #101 from stefaneberl/release/1.1
Browse files Browse the repository at this point in the history
Release/1.1
  • Loading branch information
stefaneberl authored Jul 20, 2018
2 parents 40b2bbc + 9250411 commit ed0c15e
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 16 deletions.
21 changes: 10 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,23 +76,14 @@ also provided. For detailed code samples have a look into [example.md](docs/exam

### OpenKit

An `OpenKit` instance is responsible for getting and setting application relevant information, e.g.
the application's version and device specific information.
Furthermore the `OpenKit` is responsible for creating user sessions (see `Session`).
The `OpenKit` is responsible for creating user sessions (see `Session`).

Although it would be possible to have multiple `OpenKit` instances connected to the same endpoint
(Dynatrace/AppMon) within one process, there should be one unique instance. `OpenKit` is designed to be
thread safe and therefore the instance can be shared among threads.

On application shutdown, `shutdown()` needs to be called on the OpenKit instance.

### Device

A `Device` instance, which can be retrieved from an `OpenKit` instance, contains methods
for setting device specific information. It's not mandatory for the application developer to
provide this information, reasonable default values exist.
However when the application is run on multiple different devices it might be quite handy
to know details about the used device (e.g device identifier, device manufacturer, operating system).

### Session

Expand Down Expand Up @@ -134,6 +125,14 @@ Crashes are used to report (unhandled) exceptions on a `Session`.
OpenKit enables you to tag sessions with unique user tags. The user tag is a String
that allows to uniquely identify a single user.


### GDPR Compliance

When creating an `OpenKit` instance, it is also possible to set the GDPR compliant mode
where you can specify which data is collected.
For detailed description and samples refer to [example.md](docs/example.md).
Getting user consent must be handled within the application itself.

## Example

This small example provides a rough overview how OpenKit can be used.
Expand All @@ -142,7 +141,7 @@ Detailed explanation is available in [example.md](docs/example.md).
```java
String applicationName = "My OpenKit application";
String applicationID = "application-id";
long deviceID = 42;
long deviceID = getDeviceIdentifier();
String endpointURL = "https://tenantid.beaconurl.com/mbeacon";

OpenKit openKit = new DynatraceOpenKitBuilder(endpointURL, applicationID, deviceID)
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ buildscript {
}

group 'com.dynatrace.openkit'
version '1.1.0-rc1'
version '1.1.0'

def buildNumber = System.getenv()['BUILD_NUMBER']
if (version.endsWith('-SNAPSHOT') && buildNumber != null) {
Expand Down
2 changes: 2 additions & 0 deletions docs/example.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ customize OpenKit. This includes device specific information like operating syst
| `withBeaconCacheMaxRecordAge` | sets the maximum age of an entry in the beacon cache in milliseconds | 1 h 45 min |
| `withBeaconCacheLowerMemoryBoundary` | sets the lower memory boundary of the beacon cache in bytes | 100 MB |
| `withBeaconCacheUpperMemoryBoundary` | sets the upper memory boundary of the beacon cache in bytes | 80 MB |
| `withDataCollectionLevel` | sets the data collection level (enum DataCollectionLevel) | USER_BEHAVIOR |
| `withCrashReportingLevel` | sets the crash reporting level (enum CrashReportingLevel) | OPT_IN_CRASHES |
| `enableVerbose` | enables extended log output for OpenKit if the default logger is used | `false` |

:grey_exclamation: Please refer to the the JavaDoc for more information regarding possible configuration values.
Expand Down
12 changes: 8 additions & 4 deletions src/main/java/com/dynatrace/openkit/AbstractOpenKitBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ public AbstractOpenKitBuilder withBeaconCacheUpperMemoryBoundary(long upperMemor
* OFF (0) - no data collected
* PERFORMANCE (1) - only performance related data is collected
* USER_BEHAVIOR (2) - all available RUM data including performance related data is collected
* default value is OFF(0)
* default value is USER_BEHAVIOR(2)
* </p>
*
* @param dataCollectionLevel Data collection level to apply.
Expand All @@ -215,13 +215,17 @@ public AbstractOpenKitBuilder withDataCollectionLevel(DataCollectionLevel dataCo
}

/**
* Sets the flag if crash reporting is enabled
* Sets the crash reporting level.
*
* <p>
* default value is false
* Depending on the chosen level the amount and granularity of data sent is controlled.
* OFF(0) - no crashes are collected
* OPT_OUT_CRASHES(1) - no crashes are collected, currently the same as OFF
* OPT_IN_CRASHES(2) - all crash relevant data is collected
* default value is OPT_IN_CRASHES(2)
* </p>
*
* @param crashReportLevel Flag if crash reporting is enabled
* @param crashReportLevel Crash reporting level to apply
* @return {@code this}
*/
public AbstractOpenKitBuilder withCrashReportingLevel(CrashReportingLevel crashReportLevel) {
Expand Down

0 comments on commit ed0c15e

Please sign in to comment.