Business transaction or not?

Not applicable

Hello everyone,

I have a backend with an uri like this :

https://***/***/{countryCode}/{locale}/{resource}

locale = fr or en etc .. (language)

countryCode = fr or ma etc..

resource = /design etc...

I want to know what is the most used resources by country by developer.

Can I do this with business transaction or not? If it's false why?

Thank you so much.

1 4 252
4 REPLIES 4

@Rayan Dinar ,

Great Question & valid use cases.

As far as I know, Business transactions dashboard is used to compare traffic between different API Proxy Path suffixes. It visually compares traffic for specific API patterns across multiple API proxies. It's just a traffic comparison dashboard for API Proxy patterns.

For example, if i would like to compare , traffic between different API patterns like below business transactions dashboard is useful.

https://***/***/{countryCode}/{locale}/{resource}

https://***/***/v1/resource

https://***/***/v1/status.json

2565-business-trans-dash-2.png

Q : Can I do this with business transaction or not ?

A : Unfortunately, NO

Q: Is there a way in Analytics to get the most used resources by country by developer data from my API traffic ?

**UPDATE**:

A : Yes, It's possible using statistics collector policy & custom reports. I have tested same & working as expected.

You can create custom dimensions/metrics in analytics using Statistics Collector policy which is helpful to send custom variable data into Analytics Database to create custom reports using Edge UI Custom Reports sections.

Extract Path variables using Extract Variables policy,

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<ExtractVariables async="false" continueOnError="false" enabled="true" name="Extract-Variables-1">

    <DisplayName>Extract Variables-1</DisplayName>

    <Properties/>

    <URIPath>

        <Pattern ignoreCase="false">/{country}/{locale}/{resource}</Pattern>

    </URIPath>

</ExtractVariables>

Send data to analytics using statistics collector policy.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<StatisticsCollector async="false" continueOnError="true" enabled="true" name="Statistics-Collector-1">

    <DisplayName>Statistics Collector-1</DisplayName>

    <Properties/>

    <Statistics>

        <Statistic name="customCountry" ref="country" type="string"/>

        <Statistic name="customLocale" ref="locale" type="string"/>

        <Statistic name="customResource" ref="resource" type="string"/>

    </Statistics>

</StatisticsCollector>

Create a conditional flow & attach above policies,

        <Flow name="Flow-1">
            <Description>customFlow</Description>
            <Request>
                <Step>
                    <Name>Extract-Variables-1</Name>
                </Step>
                <Step>
                    <Name>Statistics-Collector-1</Name>
                </Step>
            </Request>
            <Response/>
            <Condition>(proxy.pathsuffix MatchesPath "/*/*/*")</Condition>
        </Flow>

Create a custom report,

2569-screen-shot-2016-04-27-at-24227-pm.png

Make some API Calls,

2570-screen-shot-2016-04-27-at-24327-pm.png

See results & Drill downs,

2571-analytics.jpg

Keep us posted if you have any queries.

Regarding by Developer, Apigee by default provides packaging APIs as API Products and provide access to APIs by creating developer apps. Once you make API calls using App keys, developer will be tracked automatically by key associated with developer app created by developer which is sent with API call. You can add one more dimension which says developer to filter API request by developer.

Find attached proxy which demonstrates above functionality.

customstats-rev1-2016-04-27.zip

@Rayan Dinar , check updated answer. keep us posted if you have any queries.

I don't understand why i can't use Business Transactions

@Rayan Dinar , Agree, Business Transactions, naming is little confusing. Custom reports are the way to go for now. As communicated earlier, Business transactions dashboard is used to compare traffic between different API Proxy Path suffixes. It visually compares traffic for specific API patterns across multiple API proxies. It's just a traffic comparison dashboard for API Proxy patterns.